From 6d842183a89effdd3811b562fc6ec7facd51f9d5 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Thu, 12 Aug 2010 12:55:23 +0000 Subject: [PATCH] r5123 | ntrel | 2010-08-10 17:12:24 +0100 (Tue, 10 Aug 2010) | 4 lines Revert r4840 scope completion mode as it sometimes breaks autocompletion. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/Geany-0_19_1@5150 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 7 +++++++ src/editor.c | 16 +--------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 37a858471..4c62bddec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-08-10 Nick Treleaven + + * src/editor.c: + Revert r4840 scope completion mode as it sometimes breaks + autocompletion. + + 2010-08-05 Enrico Tröger * src/ui_utils.c, src/ui_utils.h: diff --git a/src/editor.c b/src/editor.c index 84d7a54a6..5f158757d 100644 --- a/src/editor.c +++ b/src/editor.c @@ -95,14 +95,6 @@ static struct ScintillaObject *sci; } calltip = {NULL, FALSE, NULL, 0, 0, NULL}; -static enum -{ - AUTOC_CANCELLED, - AUTOC_SCOPE, - AUTOC_TAGS, - AUTOC_DOC_WORDS -} autocompletion_mode = AUTOC_CANCELLED; - static gchar indent[100]; @@ -603,10 +595,7 @@ static void autocomplete_scope(GeanyEditor *editor) tags = tm_workspace_find_scope_members(obj ? obj->tags_array : NULL, name, TRUE, FALSE); if (tags) - { - autocompletion_mode = AUTOC_SCOPE; show_tags_list(editor, tags, 0); - } } } @@ -958,7 +947,6 @@ static gboolean on_editor_notify(G_GNUC_UNUSED GObject *object, GeanyEditor *edi case SCN_AUTOCCANCELLED: /* now that autocomplete is finishing or was cancelled, reshow calltips * if they were showing */ - autocompletion_mode = AUTOC_CANCELLED; request_reshowing_calltip(nt); break; @@ -1807,7 +1795,6 @@ autocomplete_tags(GeanyEditor *editor, const gchar *root, gsize rootlen) tags = tm_workspace_find(root, tm_tag_max_t, attrs, TRUE, doc->file_type->lang); if (tags) { - autocompletion_mode = AUTOC_TAGS; show_tags_list(editor, tags, rootlen); return tags->len > 0; } @@ -1947,7 +1934,6 @@ static gboolean autocomplete_doc_word(GeanyEditor *editor, gchar *root, gsize ro g_slist_free(list); g_string_free(words, TRUE); - autocompletion_mode = AUTOC_DOC_WORDS; show_autocomplete(sci, rootlen, str->str); g_string_free(str, TRUE); return TRUE; @@ -2007,7 +1993,7 @@ gboolean editor_start_auto_complete(GeanyEditor *editor, gint pos, gboolean forc root = linebuf + startword; rootlen = current - startword; - if (rootlen > 0 && autocompletion_mode != AUTOC_SCOPE) + if (rootlen > 0) { if (autocomplete_check_for_html(ft->id, style)) { -- 2.11.4.GIT