Changed code such, that prefixed completions are retried without a prefix, if the retrieval with one didn't return anything (i.e. that is the old behavior).

Mon, 17 Oct 2011 19:41:25 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 17 Oct 2011 19:41:25 +0200
changeset 48
baeee0cf39eb
parent 47
494990b45b4d
child 49
756adb26b7d9

Changed code such, that prefixed completions are retried without a prefix, if the retrieval with one didn't return anything (i.e. that is the old behavior).

AssistantEric/Assistant.py file | annotate | diff | comparison | revisions
--- a/AssistantEric/Assistant.py	Mon Oct 03 19:16:58 2011 +0200
+++ b/AssistantEric/Assistant.py	Mon Oct 17 19:41:25 2011 +0200
@@ -460,7 +460,8 @@
             else:
                 if prefix:
                     completions = api.getCompletions(start=word, context=prefix)
-                else:
+                if not prefix or not completions:
+                    # if no completions were returned try without prefix
                     completions = api.getCompletions(start=word)
                 for completion in completions:
                     if not completion["context"]:

eric ide

mercurial