diff options
| author | ckelsel <ckelsel@hotmail.com> | 2017-09-10 16:43:01 +0800 |
|---|---|---|
| committer | ckelsel <ckelsel@hotmail.com> | 2017-09-10 16:43:01 +0800 |
| commit | af2dd6827299070d81218e9ba54646bfaf53607c (patch) | |
| tree | 56345be9219a808efc0f34304f8e873b866a357c /src/nvim/move.c | |
| parent | 70c62d58d53f8d7d213e025f3f432e6521be8680 (diff) | |
| parent | d173d48177fd55928a9acd64a06d47371bbb6b09 (diff) | |
| download | rneovim-af2dd6827299070d81218e9ba54646bfaf53607c.tar.gz rneovim-af2dd6827299070d81218e9ba54646bfaf53607c.tar.bz2 rneovim-af2dd6827299070d81218e9ba54646bfaf53607c.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/move.c')
| -rw-r--r-- | src/nvim/move.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index 4d646f5a4b..9693132846 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -2164,16 +2164,21 @@ void do_check_cursorbind(void) int restart_edit_save = restart_edit; restart_edit = true; check_cursor(); + if (curwin->w_p_cul || curwin->w_p_cuc) { + validate_cursor(); + } restart_edit = restart_edit_save; } - /* Correct cursor for multi-byte character. */ - if (has_mbyte) + // Correct cursor for multi-byte character. + if (has_mbyte) { mb_adjust_cursor(); + } redraw_later(VALID); - /* Only scroll when 'scrollbind' hasn't done this. */ - if (!curwin->w_p_scb) + // Only scroll when 'scrollbind' hasn't done this. + if (!curwin->w_p_scb) { update_topline(); + } curwin->w_redr_status = true; } } |