Revision: 4715 http://geany.svn.sourceforge.net/geany/?rev=4715&view=rev Author: eht16 Date: 2010-02-28 15:05:47 +0000 (Sun, 28 Feb 2010)
Log Message: ----------- Fix wrongly auto-detected multiline comments (patch by Eugene Arshinov, thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/src/editor.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-02-28 14:59:52 UTC (rev 4714) +++ trunk/ChangeLog 2010-02-28 15:05:47 UTC (rev 4715) @@ -19,6 +19,9 @@ * src/msgwindow.c, src/msgwindow.h, src/ui_utils.c, src/ui_utils.h: Make Space on the compiler and messages widgets not focus the editor widget while Enter does (patch by Can Koy, thanks). + * src/editor.c: + Fix wrongly auto-detected multiline comments + (patch by Eugene Arshinov, thanks).
2010-02-28 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2010-02-28 14:59:52 UTC (rev 4714) +++ trunk/src/editor.c 2010-02-28 15:05:47 UTC (rev 4715) @@ -3182,8 +3182,12 @@ /* Use the start of the line enter was pressed on, to avoid any doc keyword styles */ indent_pos = sci_get_line_indent_position(sci, cur_line - 1); style = sci_get_style_at(sci, indent_pos); + if (!in_block_comment(lexer, style)) + return;
- if (in_block_comment(lexer, style)) + /* 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) { gchar *previous_line = sci_get_line(sci, cur_line - 1); /* the type of comment, '*' (C/C++/Java), '+' and the others (D) */ @@ -4949,5 +4953,3 @@ sci_set_current_line(sci, lstart); } } - -
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.