[gnome-builder] clang: fix completion results getting truncated



commit 56130915650b8d4bca5365ecbbaf0f178a420c74
Author: Ray Strode <rstrode redhat com>
Date:   Mon Nov 7 15:39:35 2016 -0500

    clang: fix completion results getting truncated
    
    The code passes the wrong object to clang_getNumCompletionChunks
    in a few places, leading to the wrong number of completion chunks
    getting iterated.
    
    This commit fixes those places up.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774077

 plugins/clang/ide-clang-completion-item.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/clang/ide-clang-completion-item.c b/plugins/clang/ide-clang-completion-item.c
index 97d95d8..bef0deb 100644
--- a/plugins/clang/ide-clang-completion-item.c
+++ b/plugins/clang/ide-clang-completion-item.c
@@ -53,7 +53,7 @@ ide_clang_completion_item_lazy_init (IdeClangCompletionItem *self)
     return;
 
   result = ide_clang_completion_item_get_result (self);
-  num_chunks = clang_getNumCompletionChunks (result);
+  num_chunks = clang_getNumCompletionChunks (result->CompletionString);
   markup = g_string_new (NULL);
 
   g_assert (result);
@@ -207,7 +207,7 @@ ide_clang_completion_item_create_snippet (IdeClangCompletionItem *self)
 
   result = ide_clang_completion_item_get_result (self);
   snippet = ide_source_snippet_new (NULL, NULL);
-  num_chunks = clang_getNumCompletionChunks (result);
+  num_chunks = clang_getNumCompletionChunks (result->CompletionString);
 
   for (i = 0; i < num_chunks; i++)
     {
@@ -481,7 +481,7 @@ ide_clang_completion_item_get_typed_text (IdeClangCompletionItem *self)
       guint num_chunks;
       guint i;
 
-      num_chunks = clang_getNumCompletionChunks (result);
+      num_chunks = clang_getNumCompletionChunks (result->CompletionString);
 
       for (i = 0; i < num_chunks; i++)
         {


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