[gnome-builder] clang: use :: as completion trigger



commit f12eed0f52a598274262d2a035a4b5b3209c27cc
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jun 24 11:19:28 2020 -0700

    clang: use :: as completion trigger

 src/plugins/clang/ide-clang-completion-provider.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/plugins/clang/ide-clang-completion-provider.c 
b/src/plugins/clang/ide-clang-completion-provider.c
index c6fa63f89..2f63b48a5 100644
--- a/src/plugins/clang/ide-clang-completion-provider.c
+++ b/src/plugins/clang/ide-clang-completion-provider.c
@@ -84,6 +84,14 @@ ide_clang_completion_provider_is_trigger (IdeCompletionProvider *provider,
   if (ch == '.' || ch == '(')
     return TRUE;
 
+  if (ch == ':')
+    {
+      GtkTextIter copy = *iter;
+
+      if (gtk_text_iter_backward_chars (&copy, 2))
+        return gtk_text_iter_get_char (&copy) == ':';
+    }
+
   if (ch == '>')
     {
       GtkTextIter copy = *iter;


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