How to close a tab without losing work on Mac
Note My protects unsaved work whether or not you asked it to. Here is exactly what is still recoverable after you click Don't Save, for how long, and how to take the discard back.
Closing a tab is the one editor action that can lose work in a single click. The sheet appears, you are half-reading it, you press the button that makes it go away, and a second later you realise which button that was. This guide sets out what happens at each step of closing a tab in Note My — the sheet, the five-second window after Don't Save, the bulk-close commands, and the safety net still standing behind all of it.
All of this happens on your Mac. There is no account and nothing is uploaded, so nothing you close, discard or recover ever leaves the machine.
What happens when you close a tab with unsaved edits
Press ⌘W, or click the close button at the leading edge of the tab, which appears when you hover over it. If the file has been moved, renamed or put in the Trash since you opened it, the tab tells you so, and your text is still there to save somewhere new.
If nothing is unsaved, the tab closes and the left neighbour becomes the selected tab. If there are unsaved edits, you get a sheet with three buttons: Save, Cancel and Don't Save.
A leading * on the tab title is the honest signal of unsaved work. Do not confuse it with the orange dot, which means the file changed on disk underneath you, not that you have unsaved edits.
The five seconds after Don't Save
Choosing Don't Save does not silently drop the text. A glass pill slides up near the bottom of the window reading "Discarded «Foo.swift» — restore?" with a Restore button and a countdown. It stays for five seconds, ticking once per second, then fades.
-
Stop and look at the bottom of the window
The pill arrives a beat after the tab vanishes, so look down rather than at the gap in the tab bar. If you have already moved on to the next thing, that beat is easy to miss.
-
Click Restore
The tab comes back with its content, titled
*Foo— starred and unsaved, exactly as it was before you closed it. One click on Restore is the whole manoeuvre. -
Save it, this time
Press ⌘S. The star clears and the tab becomes an ordinary saved file, so the work rests on disk rather than on a countdown. If the tab never had a file, ⌘S takes you to Save As.
Five unhurried seconds is the whole window, and one click is the whole manoeuvre. Click Restore and the tab is yours again; let the countdown finish and your answer stands, exactly as you gave it.
What Restore brings back
Restore returns the tab and the exact text you were looking at when you closed it, down to the last character you typed. It arrives starred and unsaved, ready for ⌘S, and you pick up where you left off: carry on typing, save it back to its file, or take it to Save As under a new name. The tab is yours again, sitting in the bar with the work in front of you.
If you let the countdown run out, the discard stands, and it stands everywhere: our auto-recovery safety net treats a discard you chose as a decision rather than an accident. That is the point of the countdown — you were asked, you answered, and the answer is taken seriously.
One thing is deliberately not affected. Discarding unsaved edits never touches the file on disk: the saved copy stays exactly as you last saved it, byte for byte. So even on the day the pill fades before you reach it, reopening the file puts you back at your last save, with only the edits made since then to redo. A discard costs you the unsaved edits and nothing else.
The habit that always pays is the plain one: when a draft matters, give it a name of its own and press ⌘S. And when you are about to try an edit you are unsure about, File ▸ Save a Copy As… writes a copy wherever you choose and leaves you typing in the file you were already in. A file you have saved deliberately is the version you can always walk back to, whatever happens to the tab afterwards.
Give each close its five seconds
The pill on screen is the live offer, so let it set the pace. Close a tab, glance down, and either take it back or let the countdown finish before you close the next one. Worked that way, every close in a long tidy-up is a reversible one, and a job that usually feels nervous becomes ordinary.
There is a calmer route still, and it is the one to reach for when you are clearing a window full of work: save as you go. A tab already on disk closes with no sheet, no pill and no decision to make, so the only closes that ask anything of you are the ones that genuinely hold unsaved text. Press ⌘S on the tabs you care about first, then sweep the rest.
Closing many tabs at once
Right-click a tab (or ⌃-click it) for its context menu, which runs to around 35 commands under a header showing the file's icon, name and size. Five of them close more than one tab. A tab that refuses to go — a pinned one, or one whose sheet you cancel — stays put without stopping the others.
| Command | Closes |
|---|---|
| Close Other Tabs | Every tab except the one you right-clicked. |
| Close Tabs to the Right | Everything after it — the trail you have finished with. |
| Close Tabs to the Left | Everything before it, in a single command. |
| Close Saved Tabs | Every tab with no unsaved edits. |
| Close All Tabs | Every tab, with a separate sheet for each one holding unsaved edits. |
What "Saved" means in Close Saved Tabs
It means one thing: no unsaved edits. A brand-new untitled scratchpad you have not typed into counts as saved, so Close Saved Tabs takes it along with the rest. A tab whose file exists but which you have edited since the last save still holds unsaved edits, so it stays put and you keep the sheet. That makes the outcome readable in advance, straight off the tab bar: every tab wearing a leading * survives the command, and everything without a star is on its way out. If you have been using an untitled tab as a holding pen, give it a file first — or pin it — and the tidy-up will leave it exactly where it is.
A tab in an odd state — one reading (missing), say — is left alone rather than swept up.
Closing everything with ⇧⌘W
There are two commands called Close All Tabs and they behave differently on purpose.
- From the tab's context menu, you get one sheet per tab with unsaved edits, in turn. Slow, but you decide each file on its own.
- From the File menu, ⇧⌘W, you get a single sheet up front for the whole set: Save All, Discard All or Cancel. If a save fails, the close stops there rather than carrying on without it, so you can sort that file out and try again.
Either way, pinned tabs survive it, so do not be surprised to find the window still holding a tab or two afterwards. That is the pin doing its job.
⇧⌘W is a deliberate close and it is treated as one: what you chose to save is on disk, and what you chose to close stays closed at the next launch. Our auto-recovery safety net stands behind the accidents — a crash, a force quit, a power cut — so a decision you made on purpose is never quietly undone for you.
Pin a tab so it refuses to close
Pinning is the structural fix for the tab you keep closing by accident. Pin a tab from its right-click menu and three things become true: it is held at the front of the bar, it cannot be dragged out of that position, and it beeps and refuses to close — including when a bulk close sweeps past it. A small pin badge marks it. The pinned set is remembered between launches.
A pin also settles the window around it. While any tab is pinned, the panes hold their arrangement rather than shuffling under you, which is usually exactly what you want from a window you have set up carefully. Unpin when you next feel like rearranging things, and the panes move again.
The safety net underneath all of this
Behind the sheet and the pill sits our auto-recovery safety net, holding on to work you have not saved yet. It is on from the moment you open the app and it asks nothing of you — no setting to find, no box to tick, no habit to keep up. That is the point: the protection is there on the worst day, not only on the days you remembered to arrange it.
What it gives you back is worth knowing in detail. If Note My is force quit, or the Mac loses power, your tabs are waiting the next time you open the app — every tab that was open, in the same order, with the one you were working in selected and your unsaved text in place. Tabs holding work that never reached disk wear a leading *, so a glance along the tab bar tells you which ones still want ⌘S. Untitled scratchpads come back too. Nothing to choose, nothing to confirm: the work is simply there, where you left it, and you carry on typing.
Very large documents are covered on the same terms: our large-file engine keeps a long file responsive while you type, and the safety net behaves no differently for it. All of it happens on your Mac — no account, nothing uploaded, no copy of your text leaving the machine — so what you are relying on here does not depend on a network.
Troubleshooting
The pill disappeared before I could click Restore
If the file had been saved at least once before, the version on disk is untouched and waiting: reopen it and work forward from there, having lost only the edits made since that save. Next time, let the pill be the beat you pause on — five seconds, one click, and the tab comes straight back.
I clicked Don't Save on the wrong tab of several
The pill on screen is the live offer, so act on it before you close anything else: click Restore, save the tab with ⌘S, then take stock of the tab bar. Handling one close at a time is what keeps each of them reversible for its full five seconds, and it is worth the few seconds it costs when several tabs are holding real work.
A tab beeps and will not close
It is pinned. Unpin it from its right-click menu and close it again. This also explains a bulk close that appears to have left tabs behind.
How do I get a closed tab back?
Use the pill. ⌘Z is per-tab — it is there for the text in front of you, unwinding your edits inside the tab you are working in. The route back to a tab you have just discarded is the Restore button on the pill at the bottom of the window: one click within its five seconds and the tab returns with its text intact, ready for ⌘S.
My untitled scratchpad vanished after a tidy-up
Close Saved Tabs counts an untitled tab with no unsaved edits as saved, so it goes with the rest. Give scratchpads a real file, or pin them.
The tab title says "(missing)"
The file behind it has been moved, renamed or deleted, so the tab is still yours but no longer points anywhere. Its content is intact, and ⌘S takes you to Save As, so you can put it somewhere new rather than losing it.
What you can rely on
- A five-second take-back after a discard. Click Don't Save by mistake and the pill is there a beat later. One click on Restore and the tab is back with its text, starred and ready for ⌘S.
- Your file on disk stays as you left it. Discarding unsaved edits changes what is in the window and nothing else, so the saved copy is never put at risk by a close.
- A crash is survivable. After a force quit or a power cut your tabs return at the next launch in the same order, with unsaved text in place and the one you were working in selected.
- A pinned tab holds its ground. It sits at the front of the bar and refuses every close, bulk sweeps included, until you unpin it — the structural fix for the file you cannot afford to lose.
- Long documents are no exception. Our large-file engine keeps a big file responsive while you type, and the same protections apply to it, sheet and pill and all.
- All of it happens on your Mac. No account, nothing uploaded, no copy of your text leaving the machine — the safety net does not depend on a network being there.
Frequently asked questions
How long do I have after clicking Don't Save?
Five seconds, counted down once per second on the pill. That is long enough to read it and click Restore without hurrying, and the tab comes straight back with its text. Let the countdown finish instead and your answer stands.
Do I need to switch on protection for unsaved work?
It is already on. Our auto-recovery safety net runs from the moment you open the app, with nothing to configure and nothing to remember, and it works entirely on your Mac — no account, nothing uploaded.
Does closing all tabs affect what I can recover?
Files you had already saved are untouched on disk, and the single sheet behind ⇧⌘W offers Save All, so you can send the work to disk before the window clears. A close you chose is then treated as a decision, so the tabs stay closed at the next launch and your saved files are exactly where you put them.
Will my tabs come back if the app is force quit?
Yes. At the next launch you get your tabs back — every tab that was open, in order, with the one you were working in selected and your unsaved text still in place. Tabs holding unsaved work wear a leading star.
What does the orange dot on a tab mean?
That the file changed on disk, not that it is unsaved. The unsaved marker is the leading * on the tab title.
How do I keep one tab open while closing the rest?
Either right-click it and choose Close Other Tabs, or pin it — a pinned tab refuses every close, including bulk ones, until you unpin it.