Revision: 1099 http://svn.sourceforge.net/geany/?rev=1099&view=rev Author: ntrel Date: 2006-12-15 03:57:48 -0800 (Fri, 15 Dec 2006)
Log Message: ----------- Only remove extra space indent after a multiline comment if the indent contains one too many spaces.
Modified Paths: -------------- trunk/ChangeLog trunk/src/sci_cb.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-12-14 16:29:51 UTC (rev 1098) +++ trunk/ChangeLog 2006-12-15 11:57:48 UTC (rev 1099) @@ -1,3 +1,10 @@ +2006-12-15 Nick Treleaven nick.treleaven@btinternet.com + + * src/sci_cb.c: + Only remove extra space indent after a multiline comment if the + indent contains one too many spaces. + + 2006-12-14 Frank Lanitz frank@frank.uvena.de
* about.c: Fixed a typo.
Modified: trunk/src/sci_cb.c =================================================================== --- trunk/src/sci_cb.c 2006-12-14 16:29:51 UTC (rev 1098) +++ trunk/src/sci_cb.c 2006-12-15 11:57:48 UTC (rev 1099) @@ -1748,7 +1748,14 @@ while (i >= 0 && isspace(previous_line[i])) i--; if (i >= 1 && is_doc_comment_char(previous_line[i - 1], lexer) && previous_line[i] == '/') { - SSM(sci, SCI_DELETEBACK, 0, 0); // remove whitespace indent + gint cur_line = sci_get_current_line(sci, -1); + gint indent_pos = sci_get_line_indent_position(sci, cur_line); + gint indent_len = sci_get_col_from_position(sci, indent_pos); + + /* if there is one too many spaces, delete the last space, + * to return to the indent used before the multiline comment was started. */ + if (indent_len % app->pref_editor_tab_width == 1) + SSM(sci, SCI_DELETEBACKNOTLINE, 0, 0); // remove whitespace indent g_free(previous_line); return; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.