Skip to content

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

Description

@davidlpeterson3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions