aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cursor.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-12 00:43:14 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-12 01:12:58 -0500
commite2504d21928325c5379b1e3daf8d7c7bc56f52b0 (patch)
tree4de381e5d8132a5025833c28a457a244484ef848 /src/nvim/cursor.c
parent54495c9816c19d19b10a89825b63b745de6ecfa7 (diff)
downloadrneovim-e2504d21928325c5379b1e3daf8d7c7bc56f52b0.tar.gz
rneovim-e2504d21928325c5379b1e3daf8d7c7bc56f52b0.tar.bz2
rneovim-e2504d21928325c5379b1e3daf8d7c7bc56f52b0.zip
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
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;