Skip to content

Commit

Permalink
refactor: tidy codes
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed Apr 20, 2024
1 parent a13b324 commit 20cf44f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugin/commands/auto_set_syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run_auto_set_syntax_on_view(
if event is ListenerEvent.EXEC:
return _assign_syntax_for_exec_output(view_snapshot, event)

# prerequsites
# prerequisites
if not (
(window := view.window())
and is_syntaxable_view(view, must_plaintext=must_plaintext)
Expand Down Expand Up @@ -84,10 +84,11 @@ def run_auto_set_syntax_on_view(
ListenerEvent.COMMAND,
ListenerEvent.INIT,
ListenerEvent.LOAD,
ListenerEvent.MODIFY,
ListenerEvent.PASTE,
ListenerEvent.SAVE,
ListenerEvent.UNTRANSIENTIZE,
# modify
ListenerEvent.MODIFY,
ListenerEvent.PASTE,
} and _assign_syntax_with_magika(view_snapshot, event):
return True

Expand Down

0 comments on commit 20cf44f

Please sign in to comment.