Cursor moves past end of line in vim

Open
#38 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Reproduce the issue in the linked vim demo by entering normal mode and clicking past a line’s end. Trace the cursor-position handling for that interaction; done means the cursor stays over the last character and left/right movement remains consistent.

Written by the indexing model from the issue text.

Description

Copied from https://github.com/codemirror/codemirror5/issues/5422:

To reproduce

  • Open the vim demo.
  • Enter normal mode.
  • Click past the end of a line.

Expected

Cursor should be over the last character in the line.
expected

Actual

Cursor moves past the last character in the line.
actual
Interestingly, if you move the cursor left, it goes to the correct position, and then it can't be moved right again, so it looks like CodeMirror already knows that this is an illegal position.

I'd like to help with a pull request, but I'm not sure where to start- any pointers would be appreciated :)

Dominant language
JavaScript
Stars
470
Forks
53
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from replit/codemirror-vim

All issues in replit/codemirror-vim

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.