Implement save-on-exit

This commit is contained in:
Anthony Sottile
2019-12-21 23:12:37 -08:00
parent 98f19ca6b2
commit 7525e0bc84
4 changed files with 159 additions and 91 deletions

View File

@@ -139,4 +139,7 @@ def and_exit(h):
yield
# only try and exit in non-exceptional cases
h.press('^X')
# dismiss the save prompt
if ' *' in h.get_screen_line(0):
h.press('n')
h.await_exit()