diff options
author | Tommy Allen <tommy@esdf.io> | 2018-01-25 10:28:14 -0500 |
---|---|---|
committer | Tommy Allen <tommy@esdf.io> | 2018-01-28 23:47:11 -0500 |
commit | d2ff5d5bb0807be17211b5e3e86da16038d23537 (patch) | |
tree | a9702f22d8fa1a247a2bfb0a8131b76376f16e6f /src | |
parent | 0376874c326c85b5e155ad0bed24f5dfb8707608 (diff) | |
download | rneovim-d2ff5d5bb0807be17211b5e3e86da16038d23537.tar.gz rneovim-d2ff5d5bb0807be17211b5e3e86da16038d23537.tar.bz2 rneovim-d2ff5d5bb0807be17211b5e3e86da16038d23537.zip |
Use utfc_ptr2len instead of utf_ptr2len
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/mouse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c index e4dc47efde..ea3505aec1 100644 --- a/src/nvim/mouse.c +++ b/src/nvim/mouse.c @@ -634,13 +634,13 @@ static int mouse_adjust_click(win_T *wp, int row, int col) // When 'wrap' is enabled, only the row (of the wrapped line) needs to be // checked for concealed characters. while (offset--) { - ptr += utf_ptr2len(ptr); + ptr += utfc_ptr2len(ptr); } ptr_row_offset = ptr; } for (int i = 0; i < col; i++) { - ptr_end += utf_ptr2len(ptr_end); + ptr_end += utfc_ptr2len(ptr_end); } int matchid; @@ -648,12 +648,12 @@ static int mouse_adjust_click(win_T *wp, int row, int col) int len = 0; int prev_len = 0; -#define incr() col++; ptr_end += utf_ptr2len(ptr_end) -#define decr() col--; ptr_end -= utf_ptr2len(ptr_end) +#define incr() col++; ptr_end += utfc_ptr2len(ptr_end) +#define decr() col--; ptr_end -= utfc_ptr2len(ptr_end) while (ptr < ptr_end) { prev_len = len; - len = utf_ptr2len(ptr); + len = utfc_ptr2len(ptr); matchid = syn_get_concealed_id(wp, wp->w_cursor.lnum, (colnr_T)(ptr - line)); if (matchid != 0) { @@ -682,7 +682,7 @@ static int mouse_adjust_click(win_T *wp, int row, int col) incr(); ptr += len; prev_len = len; - len = utf_ptr2len(ptr); + len = utfc_ptr2len(ptr); matchid = syn_get_concealed_id(wp, wp->w_cursor.lnum, (colnr_T)(ptr - line)); } while (prev_matchid == matchid); |