calling user commands with '<,'>
range will change cursor to line1, 0
#29448
Labels
closed:question
issues that are closed as usage questions
Problem
i'm seeing no mention about that behavior in documents, and no user-land functionality relying on it. but this behavior make it impossible to know what the original cursor is just before calling an usercmd, so i think it's a bug.
the reason i need the original cursor in an usercmd is i want to open a floating window based on the cursor.
the workaround i'm currently using is binding the callback to a keymap rhs instead, but personally i prefer to use an usercmd with meaningful name rather than a lhs which is hard to remember relatively.
Steps to reproduce
2ggVwjj
# cursor's at 4,2 nowfoo
says cursor's at 4,2:'<,'>Foo
says cursor's at 2,0Expected behavior
calling an usercmd with range wont change the cursor
Neovim version (nvim -v)
nvim 0.10
Vim (not Nvim) behaves the same?
N/A
Operating system/version
archlinux
Terminal name/version
st 0.9.2
$TERM environment variable
st-256color
Installation
pacman
The text was updated successfully, but these errors were encountered: