For example, I have this in the buffer:
line1 .... A .... line2 B line3 .... C ....
Follow these steps:
- At first it's in Normal mode and the cursor is under
jand the cursor will move to
jagain and the cursor will move to
Seems like internally Vim maintains a "user-expected" column position so when it goes from line2 to line3 it smartly restores the correct column position.
So how can I get the same behavior with Lua API (like
vim.api.nvim_win_set_cursor()) when moving the cursor one line down?