[geany/geany] 5ef6e1: Fix multiline comments at end of file

Lex Trotman git-noreply at xxxxx
Sat Sep 22 04:13:14 UTC 2012

Branch:      refs/heads/master
Author:      Lex Trotman <elextr at gmail.com>
Committer:   Lex Trotman <elextr at gmail.com>
Date:        Sat, 22 Sep 2012 04:13:14
Commit:      5ef6e1627cbe639e5f2b9d974f384c6a5b4eeec2

Log Message:
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

Modified Paths:

Modified: src/editor.c
2 files changed, 1 insertions(+), 1 deletions(-)
@@ -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) */

This E-Mail was brought to you by github_commit_mail.py (Source: TBD).

More information about the Commits mailing list