From 94577bb251d84e0d1fc822f4e33582da69a28b84 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Tue, 6 Apr 2010 17:11:36 +0000 Subject: [PATCH] Fix showing '...' item last instead of first for document word completion. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4805 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 3 +++ src/editor.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index bcf8c3682..d6a01fd45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * src/filetypes.c: Re-detect any document filetypes set to None after reloading filetype extensions (closes #2979661). + * src/editor.c: + Fix showing '...' item last instead of first for document word + completion. 2010-04-05 Enrico Tröger diff --git a/src/editor.c b/src/editor.c index 5236c882f..38a637e99 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1853,10 +1853,7 @@ static GString *get_doc_words(ScintillaObject *sci, gchar *root, gsize rootlen) g_free(word); if (nmatches == editor_prefs.autocompletion_max_entries) - { - g_string_append(words, "... "); break; - } } } ttf.chrg.cpMin = word_end; @@ -1909,6 +1906,9 @@ static gboolean autocomplete_doc_word(GeanyEditor *editor, gchar *root, gsize ro if (node->next) g_string_append_c(str, '\n'); } + if (g_slist_length(list) >= editor_prefs.autocompletion_max_entries) + g_string_append(str, "\n..."); + g_slist_free(list); g_string_free(words, TRUE); -- 2.11.4.GIT