aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorZviRackover <zvirack@gmail.com>2018-08-16 05:09:21 +0300
committerZviRackover <zvirack@gmail.com>2018-08-16 07:39:48 +0300
commitd110c6d7907d6f27f32b1d2bd91ffee7ef6097f4 (patch)
tree4e6700226b395f2cea6c172497a01eacbdca6b7d /src/nvim/getchar.c
parent30392b635689a5f25421c17ead79e521863c8b57 (diff)
downloadrneovim-d110c6d7907d6f27f32b1d2bd91ffee7ef6097f4.tar.gz
rneovim-d110c6d7907d6f27f32b1d2bd91ffee7ef6097f4.tar.bz2
rneovim-d110c6d7907d6f27f32b1d2bd91ffee7ef6097f4.zip
lint: cleanup after parent commits
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index c8f29435e3..0379b1cadb 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -2130,12 +2130,13 @@ static int vgetorpeek(int advance)
col = curwin->w_cursor.col - 1;
}
if (col > 0 && curwin->w_wcol > 0) {
- /* Correct when the cursor is on the right halve
- * of a double-wide character. */
+ // Correct when the cursor is on the right halve
+ // of a double-wide character.
ptr = get_cursor_line_ptr();
col -= utf_head_off(ptr, ptr + col);
- if ((*mb_ptr2cells)(ptr + col) > 1)
- --curwin->w_wcol;
+ if (utf_ptr2cells(ptr + col) > 1) {
+ curwin->w_wcol--;
+ }
}
}
setcursor();