Show ellipsis (...) item when there are too many symbol names for

autocompletion.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2944 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2008-09-15 12:37:24 +00:00
parent 1bee06614b
commit 89ac3b59a4
2 changed files with 17 additions and 3 deletions

View File

@ -1,7 +1,14 @@
2008-09-15 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/editor.c:
Show ellipsis (...) item when there are too many symbol names for
autocompletion.
2008-09-14 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> 2008-09-14 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* COPYING: Fixing a little encoding issue in GPL text. * COPYING: Fixing a little encoding issue in GPL text.
* po/tr.po, po/LINGUAS, src/about.c, THANKS: Adding Turkish translation * po/tr.po, po/LINGUAS, src/about.c, THANKS: Adding Turkish translation
provided by Gürkan Gür. Thanks for it. provided by Gürkan Gür. Thanks for it.

View File

@ -1397,9 +1397,16 @@ autocomplete_tags(GeanyDocument *doc, const gchar *root, gsize rootlen)
GString *words = g_string_sized_new(150); GString *words = g_string_sized_new(150);
guint j; guint j;
for (j = 0; ((j < tags->len) && (j < editor_prefs.autocompletion_max_entries)); ++j) for (j = 0; j < tags->len; ++j)
{ {
if (j > 0) g_string_append_c(words, '\n'); if (j > 0)
g_string_append_c(words, '\n');
if (j == editor_prefs.autocompletion_max_entries)
{
g_string_append(words, "...");
break;
}
g_string_append(words, ((TMTag *) tags->pdata[j])->name); g_string_append(words, ((TMTag *) tags->pdata[j])->name);
} }
show_autocomplete(sci, rootlen, words->str); show_autocomplete(sci, rootlen, words->str);