aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mouse.c
diff options
context:
space:
mode:
authorDundar Goc <gocdundar@gmail.com>2022-05-04 22:35:50 +0200
committerDundar Goc <gocdundar@gmail.com>2022-05-07 14:54:01 +0200
commit2a378e6e82cececb12339f2df51ffe107039d867 (patch)
treeacf9250e683b303d2a22ff32455100cc4f6802cf /src/nvim/mouse.c
parentd9ec57e16a13f66a4b17edd872786e2c67348752 (diff)
downloadrneovim-2a378e6e82cececb12339f2df51ffe107039d867.tar.gz
rneovim-2a378e6e82cececb12339f2df51ffe107039d867.tar.bz2
rneovim-2a378e6e82cececb12339f2df51ffe107039d867.zip
refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/mouse.c')
-rw-r--r--src/nvim/mouse.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c
index 4495473074..8038ba2cad 100644
--- a/src/nvim/mouse.c
+++ b/src/nvim/mouse.c
@@ -702,7 +702,7 @@ static int mouse_adjust_click(win_T *wp, int row, int col)
vcol = 0;
while (vcol < offset && *ptr != NUL) {
vcol += win_chartabsize(curwin, ptr, vcol);
- ptr += utfc_ptr2len(ptr);
+ ptr += utfc_ptr2len((char *)ptr);
}
ptr_row_offset = ptr;
@@ -713,7 +713,7 @@ static int mouse_adjust_click(win_T *wp, int row, int col)
ptr_end = ptr_row_offset;
while (vcol < col && *ptr_end != NUL) {
vcol += win_chartabsize(curwin, ptr_end, vcol);
- ptr_end += utfc_ptr2len(ptr_end);
+ ptr_end += utfc_ptr2len((char *)ptr_end);
}
int matchid;
@@ -723,8 +723,8 @@ static int mouse_adjust_click(win_T *wp, int row, int col)
vcol = offset;
-#define INCR() nudge++; ptr_end += utfc_ptr2len(ptr_end)
-#define DECR() nudge--; ptr_end -= utfc_ptr2len(ptr_end)
+#define INCR() nudge++; ptr_end += utfc_ptr2len((char *)ptr_end)
+#define DECR() nudge--; ptr_end -= utfc_ptr2len((char *)ptr_end)
while (ptr < ptr_end && *ptr != NUL) {
cwidth = win_chartabsize(curwin, ptr, vcol);
@@ -755,7 +755,7 @@ static int mouse_adjust_click(win_T *wp, int row, int col)
while (prev_matchid == matchid && *ptr != NUL) {
INCR();
- ptr += utfc_ptr2len(ptr);
+ ptr += utfc_ptr2len((char *)ptr);
matchid = syn_get_concealed_id(wp, lnum, (colnr_T)(ptr - line));
}
@@ -763,7 +763,7 @@ static int mouse_adjust_click(win_T *wp, int row, int col)
}
}
- ptr += utfc_ptr2len(ptr);
+ ptr += utfc_ptr2len((char *)ptr);
}
return col + nudge;
@@ -798,8 +798,8 @@ int mouse_check_fold(void)
// Remember the character under the mouse, might be one of foldclose or
// foldopen fillchars in the fold column.
if (gp->chars != NULL) {
- mouse_char = utf_ptr2char(gp->chars[gp->line_offset[row]
- + (unsigned)col]);
+ mouse_char = utf_ptr2char((char *)gp->chars[gp->line_offset[row]
+ + (unsigned)col]);
}
// Check for position outside of the fold column.