[geany/geany] 1998dc: Show different icon for keywords in the autocompletion popup
Jiří Techet
git-noreply at xxxxx
Fri Jul 22 20:11:33 UTC 2016
Branch: refs/heads/keyword_complete
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Fri, 22 Jul 2016 20:11:33 UTC
Commit: 1998dc0e2feacf0b12503010af599b7e7188ce86
https://github.com/geany/geany/commit/1998dc0e2feacf0b12503010af599b7e7188ce86
Log Message:
-----------
Show different icon for keywords in the autocompletion popup
No real tag should have tm_tag_undef_t type so we can use it to detect
keyword tags.
Modified Paths:
--------------
src/editor.c
Modified: src/editor.c
6 lines changed, 5 insertions(+), 1 deletions(-)
===================================================================
@@ -640,7 +640,9 @@ static void show_tags_list(GeanyEditor *editor, const GPtrArray *tags, gsize roo
g_string_append(words, tag->name);
/* for now, tag types don't all follow C, so just look at arglist */
- if (!EMPTY(tag->arglist))
+ if (tag->type == tm_tag_undef_t)
+ g_string_append(words, "?3");
+ else if (!EMPTY(tag->arglist))
g_string_append(words, "?2");
else
g_string_append(words, "?1");
@@ -2100,6 +2102,7 @@ autocomplete_tags(GeanyEditor *editor, GeanyFiletype *ft, const gchar *root, gsi
tag->name = g_strdup(*keyword);
tag->lang = ft->lang;
+ tag->type = tm_tag_undef_t;
g_ptr_array_add(keyword_array, tag);
}
}
@@ -4937,6 +4940,7 @@ static ScintillaObject *create_new_sci(GeanyEditor *editor)
/* tag autocompletion images */
register_named_icon(sci, 1, "classviewer-var");
register_named_icon(sci, 2, "classviewer-method");
+ register_named_icon(sci, 3, "classviewer-other");
/* necessary for column mode editing, implemented in Scintilla since 2.0 */
SSM(sci, SCI_SETADDITIONALSELECTIONTYPING, 1, 0);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list