[vim/vim] Synchronize cursorline, cursorcolumn when cursorbind is set (#1372)

57 views
Skip to first unread message

Masanori Misono

unread,
Jan 12, 2017, 12:07:53 AM1/12/17
to vim/vim, Subscribed

When cursorbind, cursorline, cursorcolumn are set in two windows, cursorline, cursorcolumn does not synchronize unless some events (e.g. scrolling or switching window) occur.

The gif of example is shown at vim-jp/issues#1009


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/1372

Commit Summary

  • synchronize cursorline, cursorclumn when cursorbind is set

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

mattn

unread,
Jan 12, 2017, 12:10:00 AM1/12/17
to vim/vim, Subscribed

for the sharing issue

before
before
after
after

Bram Moolenaar

unread,
Jan 13, 2017, 2:46:12 PM1/13/17
to vim/vim, Subscribed

Masanori Misono wrote:

> When `cursorbind`, `cursorline`, `cursorcolumn` are set in two
> windows, `cursorline`, `cursorcolumn` does not synchronize unless some

> events (e.g. scrolling or switching window) occur.
>
>
> The gif of example is shown at vim-jp/issues#1009

To me it looks like only the addition of validate_cursor() is needed.
Redrawing with VALID does appear to work.

--
hundred-and-one symptoms of being an internet addict:
260. Co-workers have to E-mail you about the fire alarm to get
you out of the building.

/// Bram Moolenaar -- Br...@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 ///

Masanori Misono

unread,
Jan 14, 2017, 1:51:03 AM1/14/17
to vim/vim, Subscribed

Hi Bram,

To me it looks like only the addition of validate_cursor() is needed.

You're right.
I confirmed that just adding validate_cursor() works as intended.

diff --git a/src/move.c b/src/move.c
index 912e51ccd..7519da4c9 100644
--- a/src/move.c
+++ b/src/move.c
@@ -2841,6 +2841,7 @@ do_check_cursorbind(void)
            restart_edit_save = restart_edit;
            restart_edit = TRUE;
            check_cursor();
+           validate_cursor();
            restart_edit = restart_edit_save;
 # ifdef FEAT_MBYTE
            /* Correct cursor for multi-byte character. */

Bram Moolenaar

unread,
Jan 14, 2017, 8:55:31 AM1/14/17
to vim/vim, Subscribed

Closed #1372 via 519d778.

Reply all
Reply to author
Forward
0 new messages