Revision: 1292 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1292&view=re... Author: frlan Date: 2010-04-24 20:31:53 +0000 (Sat, 24 Apr 2010)
Log Message: ----------- GeanyLaTeX: Set undo action properly for insert command feature
Modified Paths: -------------- trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2010-04-24 11:47:28 UTC (rev 1291) +++ trunk/geanylatex/src/geanylatex.c 2010-04-24 20:31:53 UTC (rev 1292) @@ -759,10 +759,16 @@ { gchar *cmd_str = NULL; const gchar *cmd = NULL; + GeanyDocument *doc = document_get_current(); + cmd = gtk_entry_get_text(GTK_ENTRY(textbox_command));
- cmd = gtk_entry_get_text(GTK_ENTRY(textbox_command)); + sci_start_undo_action(doc->editor->sci); + cmd_str = g_strdup_printf("\%s{}", cmd); glatex_insert_string(cmd_str, TRUE); + + sci_end_undo_action(doc->editor->sci); + g_free(cmd_str); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org