aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cursor.c
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2020-11-14 19:35:26 +0100
committerGitHub <noreply@github.com>2020-11-14 19:35:26 +0100
commit27d630926cab78511075159012ce6ac920d8747e (patch)
treedb9afbe90762056b2f2c538744ce04d571108b89 /src/nvim/cursor.c
parentd8c69adbabe963142f433a2ddad172ff46413f15 (diff)
parent5d6ecfa3c7447009da75842c611ea1b9f1db83e7 (diff)
downloadrneovim-27d630926cab78511075159012ce6ac920d8747e.tar.gz
rneovim-27d630926cab78511075159012ce6ac920d8747e.tar.bz2
rneovim-27d630926cab78511075159012ce6ac920d8747e.zip
Merge pull request #13275 from janlazo/vim-8.1.0805
vim-patch:8.1.{805,806,809,810,811}
Diffstat (limited to 'src/nvim/cursor.c')
-rw-r--r--src/nvim/cursor.c8
1 files changed, 2 insertions, 6 deletions
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;