vim-patch:8.2.5155: in diff mode windows may get out of sync

Problem:    In diff mode windows may get out of sync. (Gary Johnson)
Solution:   Avoid that the other window scrolls for 'cursorbind'.
a315ce1f32
This commit is contained in:
zeertzjq
2022-07-25 19:12:06 +08:00
parent e12c62c1f7
commit 611b43369e
3 changed files with 165 additions and 1 deletions

View File

@@ -2271,7 +2271,13 @@ void do_check_cursorbind(void)
int restart_edit_save = restart_edit;
restart_edit = true;
check_cursor();
validate_cursor();
// Avoid a scroll here for the cursor position, 'scrollbind' is
// more important.
if (!curwin->w_p_scb) {
validate_cursor();
}
restart_edit = restart_edit_save;
}
// Correct cursor for multi-byte character.