Requesting comments on unexpected setpos() behaviour; possibly a bug.
Consider this buffer:
First line example text
Second line, tab character in front
Steps to reproduce:
* Put the cursor on the "t" of the word "First"
* Place the cursor on virtual column 8 of line 2 with setpos():
:call setpos('.', [0, 2, 1, 7])
* Press k to move back up one line
As you can see, the cursor lands back on the "t" of "First". This is
unexpected: It should either land on the "i" of "line", or on the "F" of
first, depending on whether the offset 7 in setpos() is taken into
account.
Note that it doesn't matter whether 'virtualedit' is set to "all" or
not.
glts
Oh right, sorry.
Then setpos() can't be used to reliably set the cursor to some new
position in mappings or commands? Well then. Thanks!
glts