Permalink
Browse files

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
  • Loading branch information...
1 parent fbb89f5 commit 5ef6e1627cbe639e5f2b9d974f384c6a5b4eeec2 @elextr elextr committed Sep 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/editor.c
View
@@ -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) */

0 comments on commit 5ef6e16

Please sign in to comment.