glts wrote:

> 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.

This is documented:

                This does not restore the preferred column for moving
                vertically.  See |winrestview()| for that.

-- 
A meeting is an event at which the minutes are kept and the hours are lost.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui