[gnome-builder] clang: avoid double filtering with empty queries



commit e6e4084052350a55745a8ac951d72742b4659785
Author: Christian Hergert <christian hergert me>
Date:   Fri Feb 26 15:54:59 2016 -0800

    clang: avoid double filtering with empty queries

 plugins/clang/ide-clang-completion-provider.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/clang/ide-clang-completion-provider.c b/plugins/clang/ide-clang-completion-provider.c
index 4ce66c2..33d9d9c 100644
--- a/plugins/clang/ide-clang-completion-provider.c
+++ b/plugins/clang/ide-clang-completion-provider.c
@@ -361,7 +361,8 @@ ide_clang_completion_provider_code_complete_cb (GObject      *object,
     {
       if (results->len > 0)
         {
-          ide_clang_completion_provider_refilter (state->self, results, state->query);
+          if (state->query && *state->query)
+            ide_clang_completion_provider_refilter (state->self, results, state->query);
           ide_clang_completion_provider_sort (state->self);
           IDE_TRACE_MSG ("%d results returned from clang", results->len);
           gtk_source_completion_context_add_proposals (state->context,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]