From 5ef6e1627cbe639e5f2b9d974f384c6a5b4eeec2 Mon Sep 17 00:00:00 2001 From: Lex Trotman Date: Sat, 22 Sep 2012 14:13:14 +1000 Subject: [PATCH] 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 --- src/editor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor.c b/src/editor.c index 0ea5cd4a..3b002cd0 100644 --- a/src/editor.c +++ b/src/editor.c @@ -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) */