SF.net SVN: geany:[5015] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Jun 10 15:43:51 UTC 2010


Revision: 5015
          http://geany.svn.sourceforge.net/geany/?rev=5015&view=rev
Author:   ntrel
Date:     2010-06-10 15:43:50 +0000 (Thu, 10 Jun 2010)

Log Message:
-----------
Group undo action for Insert Multiline Comment.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/editor.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-06-10 11:55:39 UTC (rev 5014)
+++ trunk/ChangeLog	2010-06-10 15:43:50 UTC (rev 5015)
@@ -1,3 +1,9 @@
+2010-06-10  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/editor.c:
+   Group undo action for Insert Multiline Comment.
+
+
 2010-06-08  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * Makefile.am:

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2010-06-10 11:55:39 UTC (rev 5014)
+++ trunk/src/editor.c	2010-06-10 15:43:50 UTC (rev 5015)
@@ -3677,6 +3677,8 @@
 	g_return_if_fail(editor != NULL &&
 		editor->document->file_type != NULL && editor->document->file_type->comment_open != NULL);
 
+	sci_start_undo_action(editor->sci);
+
 	doc = editor->document;
 
 	if (doc->file_type->comment_close != NULL && strlen(doc->file_type->comment_close) > 0)
@@ -3703,7 +3705,6 @@
 	sci_insert_text(editor->sci, pos, text);
 	g_free(text);
 
-
 	/* select the inserted lines for commenting */
 	sci_set_selection_start(editor->sci, pos);
 	sci_set_selection_end(editor->sci, pos + text_len);
@@ -3722,6 +3723,8 @@
 	sci_set_current_position(editor->sci, pos, TRUE);
 	/* reset the selection */
 	sci_set_anchor(editor->sci, pos);
+
+	sci_end_undo_action(editor->sci);
 }
 
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list