On Aug 22, 2013 8:05 PM, "Christian Brabandt" <cbli...@256bit.org> wrote: > > On Thu, August 22, 2013 17:23, Bram Moolenaar wrote: > > Christian Brabandt wrote: > >> On Mo, 19 Aug 2013, Christian Brabandt wrote: > >> > >> > May be another optional parameter to the setpos() function, that > >> > if given specifies the desired cursor position? > >> > >> Like the attached patch does. > > > > Hmm, I wonder if the extra list elements are going to cause a problem in > > some existing script. > > I don't think, it will make a difference for the optional list-argument > of the setpos() call. It might only make a difference for the list > returned by the getpos() call now having 5 elements. If you're worried > about that, simply let getpos('.') always return 4 elements (though > this makes it harder to determine the prefered column).
I bet there is a bunch of scripts using 4-variable lets. Simple grep over the mess in $HOME/.vam (I hold all but my plugins there) found at least LaTeX_box plugin (ftplugin/latex-box/common.vim) and python-mode-klen (autoload/pymode/lint.vim, though it should have used line() and not getpos()). I do not know how many plugins do let pos=getpos('.') ... let [a,b,c,d]=pos , use negative indices or something else. Why not use optional argumet to getpos() then? Note: optional argument should make it return a dictionary. 5 indistinguishable numbers are way too much. Also check out winsaveview(), particularly .curswant key. Maybe there is no need to modify getpos(). > regards, > Christian > > -- > -- > 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 > > --- > You received this message because you are subscribed to the Google Groups "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.