Pressing Enter mid-document causes all text below cursor to appear deleted, requiring accept/reject

Resolved 💬 1 comment Opened Jun 23, 2026 by davidlpeterson3 Closed Jun 23, 2026

Bug Description

When pressing Enter at a position that is not the end of a document, all text below the cursor position appears to be deleted in a diff view. The user is then forced to accept or reject the apparent changes. After accepting, the file content is restored to normal. However, this workflow makes it impossible to actually edit the file, since every Enter keypress triggers a forced accept/reject cycle.

Steps to Reproduce

  1. Open a file with existing content
  2. Place cursor somewhere in the middle of the document (not at the end)
  3. Press Enter to insert a newline

Expected Behavior

A newline is inserted at the cursor position. No diff/accept flow is triggered for unrelated content.

Actual Behavior

All text below the cursor position appears to be removed and queued as a pending change. The user must accept or reject the change. After accepting, the file is back to its expected state — but no actual editing can be done without repeatedly going through this cycle.

Impact

Editing files is effectively broken when the cursor is not at the end of the document, because every Enter keypress triggers a spurious accept/reject diff for the text below the cursor.

Environment

  • Claude Code (version unknown at time of report)
  • macOS

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗