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
gk skips a line if cursor is at column 0 position (Obsidian) #165
Comments
For clarification, this only happens when the line is wrapped, correct? |
Yes that's correct. Apologies I should've mentioned that. |
I'm afraid this is a CodeMirror issue, rather than CodeMirror Vim. The unexpected behaviour is generated here and does exactly what described in the issue. Example:
I am unsure if this is the intended behaviour of the relevant function. A monkey-patch on our end would be to artificially move the cursor one character to the right and then back to the left, but I imagine that would introduce even more bugs. I believe this is the relevant function upstream. Update: |
@Opisek seems to be a bug in EditorSelection.range which creates a cursor that is displayed as a range with |
Hi,
Originally saw this discussed on the Obsidian forums here and it was suggested to make an issue here.
If cursor is at the start of a line (i.e. column 1) position then a
gk
command moves up two lines instead of one.If cursor is at any other column position
gk
works correctly.gj
works correctly at all column positions.Steps to reproduce
Open a file with wrapped long paragraph. Make sure vim is open and it is in view mode.
gg: curosr at first line
gj x 2: cursor to third line
gk: cursor to the first line rather than second
Expected result
In vim view mode, pressing gk leads to 1 viewing line up.
Actual result
Pressing gk leads to 2 viewing line up if cursor is at the head of one line.
Environment
Obsidian vim mode
Additional information
gj works fine. gk works also if cursor at the middle of a line.
The text was updated successfully, but these errors were encountered: