Skip to content

Commit

Permalink
Stop tracking on abbreviation completion
Browse files Browse the repository at this point in the history
See #139
  • Loading branch information
sergeche committed Oct 27, 2020
1 parent 4fc0521 commit 214ab5c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 214ab5c

Please sign in to comment.