codemirror-vim
codemirror-vim copied to clipboard
`j` in visual mode renders offset to actual line when there is empty lines
Description
If there is empty lines, in visual mode, the cursor renders one line offset to the actual line.
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
- Open sandbox
- Delete default content, enter
This is a test.
This is another test.
- press
ggVjjj
.
Comment
What is interesting is that in codemirror5, no such bug.