Revision: 1310 http://svn.sourceforge.net/geany/?rev=1310&view=rev Author: eht16 Date: 2007-02-21 04:11:28 -0800 (Wed, 21 Feb 2007)
Log Message: ----------- Made auto_close_bracket() static and auto close brackets only when auto completion of constructs is enabled (closes #1665015).
Modified Paths: -------------- trunk/ChangeLog trunk/src/sci_cb.c trunk/src/sci_cb.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-02-20 15:48:58 UTC (rev 1309) +++ trunk/ChangeLog 2007-02-21 12:11:28 UTC (rev 1310) @@ -1,3 +1,10 @@ +2007-02-20 Enrico Troeger enrico.troeger@uvena.de + + * src/sci_cb.c, src/sci_cb.c: + Made auto_close_bracket() static and auto close brackets only when + auto completion of constructs is enabled (closes #1665015). + + 2007-02-20 Nick Treleaven nick.treleaven@btinternet.com
* src/document.c:
Modified: trunk/src/sci_cb.c =================================================================== --- trunk/src/sci_cb.c 2007-02-20 15:48:58 UTC (rev 1309) +++ trunk/src/sci_cb.c 2007-02-21 12:11:28 UTC (rev 1310) @@ -55,6 +55,7 @@ static void auto_multiline(ScintillaObject *sci, gint pos); static gboolean is_comment(gint lexer, gint style); static void scroll_to_line(ScintillaObject *sci, gint line, gfloat percent_of_view); +static void auto_close_bracket(ScintillaObject *sci, gint pos, gchar c);
// calls the edit popup menu in the editor @@ -249,7 +250,7 @@ { // Tex auto-closing if (sci_get_lexer(sci) == SCLEX_LATEX) { - sci_cb_auto_close_bracket(sci, pos, nt->ch); // Tex auto-closing + auto_close_bracket(sci, pos, nt->ch); // Tex auto-closing sci_cb_show_calltip(idx, pos); } break; @@ -405,9 +406,10 @@ }
-void sci_cb_auto_close_bracket(ScintillaObject *sci, gint pos, gchar c) +static void auto_close_bracket(ScintillaObject *sci, gint pos, gchar c) { - if (SSM(sci, SCI_GETLEXER, 0, 0) != SCLEX_LATEX) return; + if (! app->pref_editor_auto_complete_constructs || SSM(sci, SCI_GETLEXER, 0, 0) != SCLEX_LATEX) + return;
if (c == '[') {
Modified: trunk/src/sci_cb.h =================================================================== --- trunk/src/sci_cb.h 2007-02-20 15:48:58 UTC (rev 1309) +++ trunk/src/sci_cb.h 2007-02-21 12:11:28 UTC (rev 1310) @@ -80,8 +80,6 @@
void sci_cb_auto_table(ScintillaObject *sci, gint pos);
-void sci_cb_auto_close_bracket(ScintillaObject *sci, gint pos, gchar c); - gboolean sci_cb_lexer_is_c_like(gint lexer);
gint sci_cb_lexer_get_type_keyword_idx(gint lexer);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.