458 if entry not in completionsList: |
458 if entry not in completionsList: |
459 completionsList.append(entry) |
459 completionsList.append(entry) |
460 else: |
460 else: |
461 if prefix: |
461 if prefix: |
462 completions = api.getCompletions(start=word, context=prefix) |
462 completions = api.getCompletions(start=word, context=prefix) |
463 else: |
463 if not prefix or not completions: |
|
464 # if no completions were returned try without prefix |
464 completions = api.getCompletions(start=word) |
465 completions = api.getCompletions(start=word) |
465 for completion in completions: |
466 for completion in completions: |
466 if not completion["context"]: |
467 if not completion["context"]: |
467 entry = completion["completion"] |
468 entry = completion["completion"] |
468 else: |
469 else: |