SF.net SVN: geany-plugins:[1294] trunk/geanylatex/src/geanylatex.c

frlan at users.sourceforge.net frlan at xxxxx
Sat Apr 24 20:39:20 UTC 2010


Revision: 1294
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1294&view=rev
Author:   frlan
Date:     2010-04-24 20:39:20 +0000 (Sat, 24 Apr 2010)

Log Message:
-----------
GeanyLaTeX: Put cursor into braces after inserting command

Modified Paths:
--------------
    trunk/geanylatex/src/geanylatex.c

Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c	2010-04-24 20:32:25 UTC (rev 1293)
+++ trunk/geanylatex/src/geanylatex.c	2010-04-24 20:39:20 UTC (rev 1294)
@@ -759,13 +759,16 @@
 	{
 		gchar *cmd_str = NULL;
 		const gchar *cmd = NULL;
+
 		GeanyDocument *doc = document_get_current();
 		cmd = gtk_entry_get_text(GTK_ENTRY(textbox_command));
 
 		sci_start_undo_action(doc->editor->sci);
 
-		cmd_str = g_strdup_printf("\\%s{}", cmd);
+		cmd_str = g_strdup_printf("\\%s{", cmd);
 		glatex_insert_string(cmd_str, TRUE);
+		/* This shall put the cursor inside the braces */ 
+		glatex_insert_string("}", FALSE);
 
 		sci_end_undo_action(doc->editor->sci);
 
@@ -1147,6 +1150,7 @@
 
 }
 
+
 static void
 on_wizard_response(G_GNUC_UNUSED GtkDialog *dialog, gint response,
 				   G_GNUC_UNUSED gpointer user_data)


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



More information about the Plugins-Commits mailing list