SF.net SVN: geany-plugins:[1279] trunk/geanylatex/src/geanylatex.c
frlan at users.sourceforge.net
frlan at xxxxx
Wed Apr 21 23:27:50 UTC 2010
Revision: 1279
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1279&view=rev
Author: frlan
Date: 2010-04-21 23:27:50 +0000 (Wed, 21 Apr 2010)
Log Message:
-----------
GeanyLaTeX: Add an (currently) hidden preference to turn on/off autocompletion of braces after ^ and _
Modified Paths:
--------------
trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c 2010-04-21 22:27:30 UTC (rev 1278)
+++ trunk/geanylatex/src/geanylatex.c 2010-04-21 23:27:50 UTC (rev 1279)
@@ -73,6 +73,7 @@
* and \endgroup{}. */
static gint glatex_autocompletion_context_size;
static gboolean glatex_autocompletion_only_for_latex;
+static gboolean glatex_autobraces_active = TRUE;
/* Function will be deactivated, when only loaded */
static gboolean toggle_active = FALSE;
@@ -530,8 +531,11 @@
case '_':
case '^':
{
- sci_insert_text(sci, -1, "{}");
- sci_set_current_position(sci, pos + 1, TRUE);
+ if (glatex_autobraces_active == TRUE)
+ {
+ sci_insert_text(sci, -1, "{}");
+ sci_set_current_position(sci, pos + 1, TRUE);
+ }
break;
}
} /* Closing switch */
@@ -1761,6 +1765,8 @@
"glatex_set_toolbar_active", FALSE);
glatex_autocompletion_active = utils_get_setting_boolean(config, "general",
"glatex_set_autocompletion", FALSE);
+ glatex_autobraces_active = utils_get_setting_boolean(config, "autocompletion",
+ "glatex_set_autobraces", TRUE);
/* Hidden preferences. Can be set directly via configuration file*/
glatex_autocompletion_context_size = utils_get_setting_integer(config, "autocompletion",
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