Skip to content

Commit

Permalink
fix: exception related to "None" when triggered frequently
Browse files Browse the repository at this point in the history
Related to multithread timer...

Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed Mar 2, 2024
1 parent 1f0496d commit 4ae6356
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin/commands/auto_set_syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def run_auto_set_syntax_on_view(
*,
must_plaintext: bool = False,
) -> bool:
# multithread guard...
if not G.view_snapshot_collection.get_by_view(view):
return False

if event is ListenerEvent.EXEC:
return _assign_syntax_for_exec_output(view, event)

Expand Down

0 comments on commit 4ae6356

Please sign in to comment.