Christian Brabandt wrote:
> On Fr, 31 Jan 2014, Liang Li wrote:
>
> > On Friday, January 31, 2014 4:46:58 PM UTC-5, Charles Cooper wrote:
>
> >>> the :sleep command mispositions cursor when there are splits. From
> >>> vim -u NONE,
> >>> :vsp|vsp|vsp|vsp|wincmd w|wincmd w
> >>> :sleep 2 "cursor will shift to the first split
>
> >> Just to clarify, when trying it looked to me like the cursor jumped
> >> to the first split during the sleep and then jumped back to its
> >> starting position.
>
> > Right I saw the jump. If you have no splits and call sleep, the cursor
> > stays where it is. If you have more than one cursor, the cursor will
> > jump to the virtual column number from the left edge of the screen.
> > So, for example, if you are in virtcol 17 in split 3, it will jump to
> > the 17th block of the screen. This can cause, for example, the cursor
> > to be positioned dead on the split itself.
> >
> > (... the fact that sleep draws the cursor is part of my separate and
> > mostly unrelated strategy to get getchar() to not change the cursor
> > position. Either a patch to the sleep but or to have getchar simply
> > not move the cursor would solve all my woes. :D)
>
> Can you see, if this patch fixes it for you?
>
> diff --git a/src/ex_docmd.c b/src/ex_docmd.c
> --- a/src/ex_docmd.c
> +++ b/src/ex_docmd.c
> @@ -8371,7 +8371,7 @@
> {
> n = W_WINROW(curwin) + curwin->w_wrow - msg_scrolled;
> if (n >= 0)
> - windgoto((int)n, curwin->w_wcol);
> + windgoto((int)n, W_WINCOL(curwin) + curwin->w_wcol);
> }
>
> len = eap->line2;
Thanks for the fix.
--
hundred-and-one symptoms of being an internet addict:
247. You use www.switchboard.com instead of dialing 411 and 555-12-12
for directory assistance.
/// Bram Moolenaar -- [email protected] -- 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
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.