Fix multiline comments at end of file

Multiline comments did not work at end of file because there is no
style there so also check if at end of file as well as style.
Closes #3026691
This commit is contained in:
Lex Trotman 2012-09-22 14:13:14 +10:00
parent fbb89f523a
commit 5ef6e1627c

View File

@ -3425,7 +3425,7 @@ static void auto_multiline(GeanyEditor *editor, gint cur_line)
/* Check whether the comment block continues on this line */
indent_pos = sci_get_line_indent_position(sci, cur_line);
if (sci_get_style_at(sci, indent_pos) == style)
if (sci_get_style_at(sci, indent_pos) == style || indent_pos >= sci_get_length(sci))
{
gchar *previous_line = sci_get_line(sci, cur_line - 1);
/* the type of comment, '*' (C/C++/Java), '+' and the others (D) */