Skip to content

Commit ea3ff98

Browse files
authored
Run async versions of all listeners (#139)
Matching trailing space was done synchronously on file modification, activation, and cursor movements but asynchronously after that from an interval. Now we do matching asynchronously in all cases.
1 parent 955ccaf commit ea3ff98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

trailing_spaces.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,15 +441,15 @@ def is_checked(self):
441441
# Public: Matches and highlights trailing spaces on key events, according to the
442442
# current settings.
443443
class TrailingSpacesListener(sublime_plugin.EventListener):
444-
def on_modified(self, view):
444+
def on_modified_async(self, view):
445445
if trailing_spaces_live_matching:
446446
match_trailing_spaces(view)
447447

448-
def on_selection_modified(self, view):
448+
def on_selection_modified_async(self, view):
449449
if trailing_spaces_live_matching:
450450
match_trailing_spaces(view)
451451

452-
def on_activated(self, view):
452+
def on_activated_async(self, view):
453453
global trim_modified_lines_only
454454
if trim_modified_lines_only:
455455
self.freeze_last_version(view)

0 commit comments

Comments
 (0)