Skip to content

Commit

Permalink
[replay-] update quitguard behaviour with new cmdlog
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala committed Oct 24, 2023
1 parent 633b960 commit 78b29d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions visidata/sheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,10 +1002,10 @@ def quit(vd, *sheets):

@BaseSheet.api
def confirmQuit(vs, verb='quit'):
if vs.options.quitguard and vs.precious and vs.hasBeenModified and not vd.currentReplayRow:
if vs.options.quitguard and vs.precious and vs.hasBeenModified and not vd._nextCommands:
vd.draw_all()
vd.confirm(f'{verb} modified sheet "{vs.name}"? ')
elif vs.options.getonly('quitguard', vs, False) and not vd.currentReplayRow: # if this sheet is specifically guarded
elif vs.options.getonly('quitguard', vs, False) and not vd._nextCommands: # if this sheet is specifically guarded
vd.draw_all()
vd.confirm(f'{verb} guarded sheet "{vs.name}"? ')

Expand Down

0 comments on commit 78b29d9

Please sign in to comment.