Skip to content

Commit

Permalink
Sort completions
Browse files Browse the repository at this point in the history
  • Loading branch information
mvoidex committed Sep 23, 2016
1 parent bbc8ebe commit 19ebabb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions unicodecomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ def on_query_completions(self, view, prefix, locations):
if not p:
return

log(p[0])

(pre, list_chars) = get_list_prefix(p[0])
# returns completions
if pre is not None:
Expand All @@ -151,7 +149,7 @@ def drop_prefix(pr, s):
else:
completions = [('\\' + k + '\t' + maths[k], maths[k]) for k in maths.keys() if k.startswith(p[0])]
completions.extend([('\\' + k + '\t' + maths[synonyms[k]], maths[synonyms[k]]) for k in synonyms.keys() if k.startswith(p[0])])
return completions
return sorted(completions, key = lambda k: k[0])

def on_query_context(self, view, key, operator, operand, match_all):
if key == 'unicode_math_syntax_allowed':
Expand Down

0 comments on commit 19ebabb

Please sign in to comment.