Revision: 1173 http://svn.sourceforge.net/geany/?rev=1173&view=rev Author: ntrel Date: 2007-01-11 03:59:40 -0800 (Thu, 11 Jan 2007)
Log Message: ----------- Fix commenting multiple lines (oops). Set single undo action when toggling multiple lines.
Modified Paths: -------------- trunk/ChangeLog trunk/src/sci_cb.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-01-09 23:53:25 UTC (rev 1172) +++ trunk/ChangeLog 2007-01-11 11:59:40 UTC (rev 1173) @@ -1,3 +1,10 @@ +2007-01-11 Nick Treleaven nick.treleaven@btinternet.com + + * src/sci_cb.c: + Fix commenting multiple lines (oops). + Set single undo action when toggling multiple lines. + + 2007-01-09 Enrico Tröger enrico.troeger@uvena.de
* src/callbacks.c:
Modified: trunk/src/sci_cb.c =================================================================== --- trunk/src/sci_cb.c 2007-01-09 23:53:25 UTC (rev 1172) +++ trunk/src/sci_cb.c 2007-01-11 11:59:40 UTC (rev 1173) @@ -1309,7 +1309,7 @@
buf_len = MIN((gint)sizeof(sel) - 1, line_len - 1); if (buf_len <= 0) - break; + continue; sci_get_text_range(doc_list[idx].sci, line_start, line_start + buf_len, sel); sel[buf_len] = '\0';
@@ -1433,6 +1433,8 @@ co_len = strlen(co); if (co_len == 0) return;
+ SSM(doc_list[idx].sci, SCI_BEGINUNDOACTION, 0, 0); + for (i = first_line; (i <= last_line) && (! break_loop); i++) { gint buf_len; @@ -1443,7 +1445,7 @@
buf_len = MIN((gint)sizeof(sel) - 1, line_len - 1); if (buf_len <= 0) - break; + continue; sci_get_text_range(doc_list[idx].sci, line_start, line_start + buf_len, sel); sel[buf_len] = '\0';
@@ -1535,6 +1537,8 @@ } }
+ SSM(doc_list[idx].sci, SCI_ENDUNDOACTION, 0, 0); + // restore selection if there is one if (sel_start < sel_end) { @@ -1634,7 +1638,7 @@
buf_len = MIN((gint)sizeof(sel) - 1, line_len - 1); if (buf_len <= 0) - break; + continue; sci_get_text_range(doc_list[idx].sci, line_start, line_start + buf_len, sel); sel[buf_len] = '\0';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.