# Editor title-bar auto-expand puts Undo File under the cursor when aiming for Markdown Preview

**URL:** <https://forum.cursor.com/t/editor-title-bar-auto-expand-puts-undo-file-under-the-cursor-when-aiming-for-markdown-preview/171801>\
**Category:** Bug Reports\
**Tags:** layout, review\
**Created:** [September 16, 2026, 12:55am UTC](https://forum.cursor.com/t/editor-title-bar-auto-expand-puts-undo-file-under-the-cursor-when-aiming-for-markdown-preview/171801 "2026-09-16T00:55:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phoebus\_Chen](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Phoebus\_Chen](https://forum.cursor.com/u/Phoebus_Chen)\
**Post date:** [September 16, 2026, 12:55am UTC](https://forum.cursor.com/t/editor-title-bar-auto-expand-puts-undo-file-under-the-cursor-when-aiming-for-markdown-preview/171801/1 "2026-09-16T00:55:04Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

**Where:** Editor, Tab & Chat — editor title bar on Markdown files  
**What happens:** The title-bar action cluster auto-expands and collapses. Preview and Undo File sit next to each other / Undo File appears where Preview was. Clicking Preview often hits Undo File instead, which discards the file.  
**How often:** Multiple times in one session. Latest: reviewing an untracked agent-written `pr-*-review-guide.md`; intended Preview, hit Undo File, file gone.

**Why this is easy to hit:** The control set is unstable. Buttons appear/move under the pointer. Preview (safe) and Undo File (destructive) are adjacent. Untracked files have no git history to recover from.  
**Workaround:** Restore from the agent / local history if anything still has the bytes.

### Steps to Reproduce

1. Open an unsaved/untracked Markdown file (agent-created is enough).
2. Move the pointer toward Preview in the editor title bar.
3. Wait for (or trigger) the title-bar buttons to expand/collapse.
4. Click.

### Expected Behavior

Preview opens. Layout should not put a destructive action under a click aimed at Preview. Undo File should not be one misclick away from Preview, or should confirm for untracked files.

**Actual:** Undo File runs. The file is discarded with no useful undo.

### Operating System

Linux

### Version Information

Linux (WSL2), `linux 6.18.33.2-microsoft-standard-WSL2`  
Cursor 3.20.21 (system setup)

### For AI issues: which model did you use?

N/A

### Additional Information

Related: preview/review buttons overlapping or shifting

> [@Preview/Markdown buttons overlap with Review File action buttons](https://forum.cursor.com/t/preview-markdown-buttons-overlap-with-review-file-action-buttons/151333):
>
> When reviewing multi-file changes (e.g. from an Agent edit), the editor toolbar gets crowded. The Preview / Markdown toggle buttons for .md files occupy the same horizontal space as the Review Next File, Undo File, and Keep File buttons. This causes the buttons to overlap and compete for space, making both sets harder to click.

> [@UX Bug - when tapping approve 'undo all' appears in the same position making people tap it by accident](https://forum.cursor.com/t/ux-bug-when-tapping-approve-undo-all-appears-in-the-same-position-making-people-tap-it-by-accident/154784):
>
> Where does the bug appear (feature/product)? Somewhere else… Describe the Bug Cursor UX Bug - when tapping approve, the ‘undo all’ appears random and it’s tapped by accident. Very annoying. Steps to Reproduce Cursor UX Bug - when tapping approve, the ‘undo all’ appears random and it’s tapped by accident. Very annoying. It’s the button in the middle of the code screen. Screenshots / Screen Recordings Operating System MacOS Version Information Version:…

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [September 16, 2026, 8:01am UTC](https://forum.cursor.com/t/editor-title-bar-auto-expand-puts-undo-file-under-the-cursor-when-aiming-for-markdown-preview/171801/6 "2026-09-16T08:01:41Z")

</div>

Hey @Phoebus_Chen, thanks for the detailed report, and sorry about the lost file. ☹

The Preview / Markdown toggle and the review buttons (Undo File / Keep File, or Keep all changes / Review Next File) share the same row under the tabs. When the agent’s pending changes for that file appear, change, or get resolved, the review buttons are added or removed, and everything in that row shifts, which can put Undo File where Preview was a moment earlier. This is a known issue we’re already tracking, and I’ve added your report to it.

Two things that help in the meantime:

1. Move the review buttons out of that row entirely: open Cursor Settings, go to General, and set “Review Control Location” to “Island”. Undo File / Keep File then show up in a floating bar inside the editor instead of next to the Markdown toggle.

2. For a file the agent created, Undo File removes the file itself, so Ctrl+Z won’t bring it back. The content is still in the chat: expand the edit step in the conversation to copy it, or ask the agent to recreate the file. “Local History: Find Entry to Restore” from the Command Palette may also have a snapshot if the file had been saved.

For files that already existed, clicking into the file and pressing Ctrl+Z right after an accidental Undo File restores the changes.
