aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mouse.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 23:11:25 +0200
committerdundargoc <gocdundar@gmail.com>2022-08-31 13:47:18 +0200
commitfb1edb2f5728d74ae811c6ab32395598cea5609b (patch)
treeb476bb9c23a02167dd74f0da65343993f134c2b8 /src/nvim/mouse.c
parent0903702634d8e5714749ea599a2f1042b3377525 (diff)
downloadrneovim-fb1edb2f5728d74ae811c6ab32395598cea5609b.tar.gz
rneovim-fb1edb2f5728d74ae811c6ab32395598cea5609b.tar.bz2
rneovim-fb1edb2f5728d74ae811c6ab32395598cea5609b.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/mouse.c')
-rw-r--r--src/nvim/mouse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c
index 73147204a1..90084bde17 100644
--- a/src/nvim/mouse.c
+++ b/src/nvim/mouse.c
@@ -633,7 +633,7 @@ colnr_T vcol2col(win_T *const wp, const linenr_T lnum, const colnr_T vcol)
// try to advance to the specified column
char_u *line = ml_get_buf(wp->w_buffer, lnum, false);
chartabsize_T cts;
- init_chartabsize_arg(&cts, wp, lnum, 0, line, line);
+ init_chartabsize_arg(&cts, wp, lnum, 0, (char *)line, (char *)line);
while (cts.cts_vcol < vcol && *cts.cts_ptr != NUL) {
cts.cts_vcol += win_lbr_chartabsize(&cts, NULL);
MB_PTR_ADV(cts.cts_ptr);
@@ -666,7 +666,7 @@ void set_mouse_topline(win_T *wp)
static colnr_T scroll_line_len(linenr_T lnum)
{
colnr_T col = 0;
- char_u *line = ml_get(lnum);
+ char_u *line = (char_u *)ml_get(lnum);
if (*line != NUL) {
for (;;) {
int numchar = win_chartabsize(curwin, (char *)line, col);
@@ -771,7 +771,7 @@ static int mouse_adjust_click(win_T *wp, int row, int col)
// highlighting the second byte, not the ninth.
linenr_T lnum = wp->w_cursor.lnum;
- char_u *line = ml_get(lnum);
+ char_u *line = (char_u *)ml_get(lnum);
char_u *ptr = line;
char_u *ptr_end;
char_u *ptr_row_offset = line; // Where we begin adjusting `ptr_end`