[gnome-builder] jedi: autocomplete after period



commit 1b880bba32ea34375b0587783bc720b507ee4f50
Author: Christian Hergert <christian hergert me>
Date:   Fri Oct 2 02:35:24 2015 -0700

    jedi: autocomplete after period
    
    Oops, pretty important one.

 plugins/jedi/jedi_plugin.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/jedi/jedi_plugin.py b/plugins/jedi/jedi_plugin.py
index a0ee8a4..a4a48da 100644
--- a/plugins/jedi/jedi_plugin.py
+++ b/plugins/jedi/jedi_plugin.py
@@ -252,7 +252,8 @@ class JediCompletionProvider(Ide.Object,
         if context.get_activation() == GtkSource.CompletionActivation.INTERACTIVE:
             _, iter = context.get_iter()
             iter.backward_char()
-            if not is_symbol_char(iter.get_char()):
+            ch = iter.get_char()
+            if not is_completable_char(ch):
                 return False
             buffer = iter.get_buffer()
             if Ide.CompletionProvider.context_in_comment(context):
@@ -409,5 +410,5 @@ class JediCompletionProposal(Ide.CompletionItem, GtkSource.CompletionProposal):
     def do_changed(self):
         pass
 
-def is_symbol_char(ch):
-    return ch == '_' or ch.isalnum()
+def is_completable_char(ch):
+    return ch in ('_', '.') or ch.isalnum()


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