microsoft / microsoft/edit

[Alt] + [Leftarrow] at EOF breaks cursor position when word wrap is active, potential freeze

Open
#778 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug P-high
Dominant language
Rust
Stars
14.6k
Forks
734
Avg merge
8h 40m
Merged PRs (30d)
4

Description

When I edit a document with active word wrap, have at least one wrapped line, move my cursor to the end of the last line (end of file) and press [Alt] + [Leftarrow], the cursor jumps to the next empty line. But if I now type characters, they still appear in the previous line, dissociated from the cursor position. Alternating between [Leftarrow] and [Rightarrow] keys moves the cursor further down and increases the mismatch between displayed cursor and the position where typed characters appear.

When I then move the cursor up with [Uparrow], both the displayed cursor and the position of typed characters move up. Once the latter moves above the first line of the document, Edit freezes. Neither saving nor exiting the program is possible at this point.

[Alt] + [Leftarrow] doesn't have a keybinding and in all other cases just acts like [Leftarrow], which is also my expected behaviour in this case.

I am using Edit on Windows 11, version 1.2.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce this in Edit 1.2.1 on Windows 11 with word wrap enabled, a wrapped line, and the cursor at EOF; then follow the reported Alt+Leftarrow, arrow-key, typing, and freeze sequence. Done means Alt+Leftarrow behaves like Leftarrow at EOF, with displayed and typed positions staying aligned and no freeze.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.