Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

j in visual mode renders offset to actual line when there is empty lines #171

Closed
zzhixin opened this issue Mar 28, 2024 · 0 comments · Fixed by #174
Closed

j in visual mode renders offset to actual line when there is empty lines #171

zzhixin opened this issue Mar 28, 2024 · 0 comments · Fixed by #174

Comments

@zzhixin
Copy link

zzhixin commented Mar 28, 2024

Description

If there is empty lines, in visual mode, the cursor renders one line offset to the actual line.
codemirror-vim

Expected behavior

In the gif above, after pressing j, the cursor should be at the second line rather than the end of the first line. After pressing 2xj, the cursor should be at the third line rather than the second line.

Although the cursor get right after pressing 3xj, the behavior is weird that the cursor goes 2 lines downward at the last j stroke.

Reproduce

  1. Open sandbox
  2. Delete default content, enter
This is a test.


This is another test.
  1. press ggVjjj.

Comment

What is interesting is that in codemirror5, no such bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant