Kaydet (Commit) a4a871c9 authored tarafından Nick Treleaven's avatar Nick Treleaven

Prevent calltip after typing '(' when in a comment or string.

Allow forced autocompletion in a comment or string.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1844 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 04802a6a
......@@ -13,6 +13,9 @@
Only focus the current document after switching pages if the open
files treeview currently has focus (otherwise focus commands can be
overridden, e.g. when pressing F4 during opening several files).
* src/editor.c:
Prevent calltip after typing '(' when in a comment or string.
Allow forced autocompletion in a comment or string.
2007-08-29 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
......
......@@ -863,7 +863,7 @@ gboolean editor_show_calltip(gint idx, gint pos)
if (pos == -1) return FALSE;
}
style = SSM(sci, SCI_GETSTYLEAT, pos, 0);
style = SSM(sci, SCI_GETSTYLEAT, pos - 1, 0); // the style 1 before the brace (which may be highlighted)
if (is_comment(lexer, style))
return FALSE;
......@@ -975,7 +975,7 @@ gboolean editor_start_auto_complete(gint idx, gint pos, gboolean force)
style = SSM(sci, SCI_GETSTYLEAT, pos, 0);
// don't autocomplete in comments and strings
if (is_comment(lexer, style))
if (!force && is_comment(lexer, style))
return FALSE;
linebuf = sci_get_line(sci, line);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment