Markdown editor tab cannot be closed — close button and Ctrl+W ineffective (no pin, no preview indicator)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

A Markdown file tab (PRODUCT.md) cannot be closed. Clicking the × on the tab has no effect. The tab is not pinned (no “Unpin Tab” in context menu), and the tab title is not italic (not in preview mode). Standard close shortcuts may also fail depending on state.

This may be related to the known Markdown Preview dirty-state bug (#160325), but occurs without obvious preview-mode indicators.

Steps to Reproduce

Open a Markdown file (e.g. PRODUCT.md) in a workspace on Windows.
(Possibly) switch between Markdown Source and Preview at some point, or open the file via @ mention in Agent chat.
Attempt to close the tab via:
Click × on the tab
Ctrl+W
Command Palette → “Close Editor”
Observe that the tab remains open.
Note: Exact reproduction steps are uncertain; the tab entered a stuck state during normal use. User did not intentionally pin the tab or leave it in visible preview mode.

Expected Behavior

The editor tab should close when clicking ×, pressing Ctrl+W, or running “Close Editor”.

Operating System

Windows 10/11

Version Information

Cursor: 3.7.33 (4cf4ef135d096f52891a558dcf40d0666dac4ab0, x64)
OS: Windows 10.0.26200
File type: .md (Markdown)
Project: Local workspace, no special .vscode config

Additional Information

I have read an relevant essay —— Unable to close specific tabs after using Markdown preview mode

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. Yep, it’s the same issue as in the thread you linked. It’s a known bug in the WYSIWYG markdown editor. If you switch between Preview and Source with unsaved changes, the dirty state breaks and the tab won’t close after that. It can reproduce even if there’s no visible preview indicator, like in your case.

Workaround:

  • If the tab is already stuck, press Ctrl+Shift+P then run Reload Window. Restarting Cursor also unblocks closing.
  • To avoid hitting it, edit .md files in Source view and don’t switch to Preview with unsaved changes.

We’re aware of the bug, but I can’t share an ETA for a fix yet. If there’s an update, I’ll reply in the thread.