Skip to content

Commit

Permalink
change interrupt behaviour on quit in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenZcience committed Feb 19, 2024
1 parent 4181b67 commit f7107c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cat_win/util/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,10 @@ def _action_quit(self, write_func) -> bool:
self._action_render_scr('Save changes? [y]es, [n]o; Abort? ESC')
wchar, key = next(self.get_char)
if key in ACTION_HOTKEYS:
if key in [b'_action_quit', b'_action_interrupt']:
if key == b'_action_quit':
break
if key == b'_action_interrupt':
return True
if key == b'_action_background':
getattr(self, key.decode(), lambda *_: False)(None)
if key == b'_action_save':
Expand Down

0 comments on commit f7107c0

Please sign in to comment.