Skip to content

Commit 32342ba

Browse files
committed
Fix disabling of completions in comments and strings
Issue #120
1 parent 8ae76ff commit 32342ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tern.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ def on_selection_modified_async(self, view):
5353
on_selection_modified(view)
5454

5555
def on_query_completions(self, view, prefix, _locations):
56-
if view.score_selector(sel_start(view.sel()[0]), 'string.quoted, comment') > 0: return None
56+
sel = sel_start(view.sel()[0])
57+
if view.score_selector(sel, 'string.quoted') > 0: return None
58+
if view.score_selector(sel, 'comment') > 0: return None
5759

5860
pfile = get_pfile(view)
5961
if pfile is None: return None

0 commit comments

Comments
 (0)