Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Critical Bug: Undo Operation Deletes Entire File Content
Summary
When performing an Undo operation (Cmd+Z or Ctrl+Z) in Cursor IDE, the entire file content is deleted, resulting in a completely empty file. This is a critical bug that causes data loss.
Steps to Reproduce
- Open a file in Cursor IDE and make some edits
- Perform an Undo operation (Cmd+Z / Ctrl+Z)
- Result: The entire file content is deleted, leaving an empty file
Expected Behavior
- Undo should only revert the last edit operation
- File content should never be completely deleted
Actual Behavior
- All file content is deleted
- Without Git, the work is permanently lost
- This has occurred multiple times
Environment
- OS: macOS 15.7.4 (Build 24G517)
- Shell: zsh
- Cursor Version: (Please check Help → About)
- File Type: Python files (.py), but may affect other file types
- File Size: Occurs with various file sizes, possibly more frequent with larger files
Impact
- Severity:
CRITICAL - Causes data loss - Frequency: Recurring issue (happened multiple times)
- Data Loss: Yes - Work is lost without Git recovery
Workaround
- Use Git to restore the file:
git restore <filename> - Commit frequently to prevent data loss
- Manually save (Cmd+S) before performing Undo operations
Additional Notes
- This bug has occurred multiple times in the same session
- It seems to happen more frequently after complex editing operations or with larger files
- The file still exists on disk (can be restored via Git), but the editor shows it as empty
- This is a severe issue that needs immediate attention as it directly impacts user productivity and data safety
Request
Please prioritize fixing this bug as soon as possible. Data loss is a critical issue that severely impacts user trust and productivity.
Report This Bug
Recommended Channel (Fastest Response):
- Cursor Community Forum: Bug Reports - Cursor - Community Forum
- Click “New Topic” and paste this report
Alternative Channel:
- GitHub Issues: GitHub · Where software is built
- Click “New Issue” and paste this report
Note: According to the Cursor team, the forum is the main site for bug reports and provides the fastest response.
Steps to Reproduce
- Open a file in Cursor IDE and make some edits
- Perform an Undo operation (Cmd+Z / Ctrl+Z)
- Result: The entire file content is deleted, leaving an empty file
Note: This has occurred multiple times, especially after complex editing operations or with larger files.
Operating System
MacOS
Version Information
Version: 2.4.37 (Universal)
VSCode Version: 1.105.1
Commit: 7b9c34466f5c119e93c3e654bb80fe9306b6cc70
Date: 2026-02-12T23:15:35.107Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 24.6.0
Does this stop you from using Cursor
No - Cursor works, but with this issue