fix complete with no prefixed word
authorAlan Knowles <alan@roojs.com>
Tue, 13 Feb 2024 14:43:37 +0000 (22:43 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 13 Feb 2024 14:43:37 +0000 (22:43 +0800)
src/Palete/CompletionProvider.vala

index 8195fc0..cfc902c 100644 (file)
@@ -252,7 +252,9 @@ namespace Palete {
                        this.model = new CompletionModel(this, context, res, cancellable); 
                        var word = context.get_word();
                        GLib.debug("Context word is %s, %d", word, (int)word.length);
-                       
+                       if (word.length < 1) {
+                               word = " "; // this should filter out everything, and prevent it displaying 
+                       }
                        
                        var expression = new global::Gtk.PropertyExpression(typeof(CompletionProposal), null, "label");
                        this.filter = new global::Gtk.StringFilter(expression);