From e2504d21928325c5379b1e3daf8d7c7bc56f52b0 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 12 Nov 2020 00:43:14 -0500 Subject: vim-patch:8.1.0806: too many #ifdefs Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 2. https://github.com/vim/vim/commit/fc3abf47fbe1e426f2b676c316c81ee9ff607075 --- src/nvim/cursor.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/nvim/cursor.c') diff --git a/src/nvim/cursor.c b/src/nvim/cursor.c index d3ffab1759..74a6f77a6d 100644 --- a/src/nvim/cursor.c +++ b/src/nvim/cursor.c @@ -242,9 +242,7 @@ static int coladvance2( } // Prevent from moving onto a trail byte. - if (has_mbyte) { - mark_mb_adjustpos(curbuf, pos); - } + mark_mb_adjustpos(curbuf, pos); if (wcol < 0 || col < wcol) { return FAIL; @@ -378,9 +376,7 @@ void check_cursor_col_win(win_T *win) } else { win->w_cursor.col = len - 1; // Move the cursor to the head byte. - if (has_mbyte) { - mark_mb_adjustpos(win->w_buffer, &win->w_cursor); - } + mark_mb_adjustpos(win->w_buffer, &win->w_cursor); } } else if (win->w_cursor.col < 0) { win->w_cursor.col = 0; -- cgit