Repository navigation
Undo close tab (Ctrl+Shift+T) reopens the last closed file tab where it was, with its undo - #580
Open
a-team-app[bot] wants to merge 5 commits into
Open
a-team-app[bot] wants to merge 5 commits into
a-team-app[bot] wants to merge 5 commits into
Conversation
Closing a tab by mistake meant finding the file again and losing its undo history. Each file tab that closes is now remembered (up to 20 per session) with its group, strip index, cursor and undo steps, and Ctrl+Shift+T / uct / File > Undo close tab brings the newest back. The strip index is taken as each tab goes, so after Close other or Close all tabs repeated presses rebuild the strip in order. Undo is restored only when the reopened file's lines are exactly those the steps were recorded against, VS Code's rule, so a file changed on disk or closed dirty with Don't save reopens with fresh history. Files open again or deleted are skipped; a folder switch clears the list. Closes #578 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Open
13 tasks
…ose-tab # Conflicts: # AGENTS.md
Contributor
Author
A_renamed_file_takes_its_copy_with_it counted the recovery folder while the next session's background write was still mid-rename, so it occasionally saw a leftover .tmp file. Recovering_takes_over_the_copy already waits; this test now does too. Closes #578 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
CI failed on |
Open
2 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ctrl+Shift+T(alsouct, and File › Undo close tab after Close all tabs) reopens the file tab you closed most recently. It comes back in the same group and slot in the tab strip as the active tab, with the cursor and scroll where they were.Ctrl+Zand redo pick up where they left off, as long as the file on disk still holds what the tab had when it closed. Press it again to bring back the next one. After Close other tabs or Close all tabs, repeated presses bring the tabs back one at a time, in their original order.Closes #578
Notes
Tabsdraws no close button on a tab, so TuiCode has none. Every way a file tab closes goes throughEditorGroup.Close, and that is where tabs are remembered, so a close button added later would count with no extra work.a-team try tuicode 580