Skip to content

Conversation

midichef
Copy link
Contributor

@midichef midichef commented Sep 8, 2025

When I replay a command log, like with echo |vd -p - then modify the sheet i, and try to undo it with U, I get a fail error: nothing to undo on current sheet.

That's because undo skips the first command in the log (after skipping any earlier options-setting commands), expecting it to be the command that created the sheet:

# skip the first remaining command, to exclude it from undo,
# because it is always the one that created the sheet
for i, cmdlogrow in enumerate(reversed(list(cmdlogrows)[1:])):

That's true for most sheets, but the replayed cmdlog sheet does not have a sheet creation command, and it breaks the expectation.

This PR fixes the undo by inserting a no-op as the first command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants