Skip to content

Undo Closing a Tab

Jace edited this page Nov 6, 2026 · 4 revisions

Closed a tab by mistake? Press ⌘Z straight away and it comes back, like History › Reopen Closed Tab (⇧⌘T). You can set another shortcut on its Settings page. It only works right after closing: once you type or click, ⌘Z goes back to undoing whatever you're doing.

Why use it

It's easy to close the wrong tab, and ⇧⌘T is a long reach. This lets ⌘Z, which you already press to undo, bring the tab back. Handy if you undo by habit. It only takes the shortcut right after a tab closes, so it doesn't get in the way of undo in text fields. If you'd rather keep ⇧⌘T, leave it off.

Turn it on

Open Dia → Settings → Patches and switch on Undo Closing a Tab. Or run:

diatweaks enable undoCloseTab

FAQ

Does it get in the way of ⌘Z in text fields?

No. ⌘Z only reopens a tab if closing it was the last thing you did. Typing, clicking or any other key in between hands ⌘Z back to the page or field you're in.

What about undoing Tidy Tabs?

⌘Z undoes whichever happened last. Tidy your tabs and then close one, and ⌘Z reopens the tab; tidy after closing, and ⌘Z undoes the tidy.

Does it work with tabs at the top?

Yes, in both layouts.

All tweaks

Clone this wiki locally