From 214ab5cba561f3dceff72dffea4e9f289ff38b52 Mon Sep 17 00:00:00 2001 From: Sergey Chikuyonok Date: Tue, 27 Oct 2020 23:25:46 +0300 Subject: [PATCH] Stop tracking on abbreviation completion See https://github.com/emmetio/sublime-text-plugin/issues/139 --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index a8f862d..2ce8073 100644 --- a/main.py +++ b/main.py @@ -530,8 +530,12 @@ def on_query_completions(self, editor: sublime.View, prefix: str, locations: lis def on_text_command(self, view: sublime.View, command_name: str, args: list): if command_name == 'auto_complete' and abbreviation.allow_tracking(view, get_caret(view)): self.pending_completions_request = True - # elif command_name in ('commit_completion', 'insert_best_completion'): - # abbreviation.stop_tracking(view) + elif command_name in ('commit_completion', 'insert_best_completion'): + # NB: abbreviation tracking shouldn’t be stopped to properly complete + # words for abbreviation. But I’m stopping it since it mistakenly fails + # when completing native snippets in PHP, see + # https://github.com/emmetio/sublime-text-plugin/issues/139 + abbreviation.stop_tracking(view) def on_post_text_command(self, editor: sublime.View, command_name: str, args: list): if command_name == 'auto_complete':