diff options
| author | Dundar Göc <gocdundar@gmail.com> | 2022-08-26 23:11:25 +0200 |
|---|---|---|
| committer | dundargoc <gocdundar@gmail.com> | 2022-11-19 16:27:10 +0100 |
| commit | 40f3f75867bf03abfd90e0389a38197a00d37af1 (patch) | |
| tree | d14642161d70ef658f5b23fea1693e0be9a84804 /src/nvim/normal.c | |
| parent | 6e8ed5abaa9c33d1d78ab7ff5b07dd5bac623a1d (diff) | |
| download | rneovim-40f3f75867bf03abfd90e0389a38197a00d37af1.tar.gz rneovim-40f3f75867bf03abfd90e0389a38197a00d37af1.tar.bz2 rneovim-40f3f75867bf03abfd90e0389a38197a00d37af1.zip | |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/normal.c')
| -rw-r--r-- | src/nvim/normal.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index ed689df91c..5536b7ba08 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -1832,11 +1832,11 @@ void clear_showcmd(void) int chars = 0; if (cursor_bot) { - s = ml_get_pos(&VIsual); + s = (char_u *)ml_get_pos(&VIsual); e = (char_u *)get_cursor_pos_ptr(); } else { s = (char_u *)get_cursor_pos_ptr(); - e = ml_get_pos(&VIsual); + e = (char_u *)ml_get_pos(&VIsual); } while ((*p_sel != 'e') ? s <= e : s < e) { l = utfc_ptr2len((char *)s); @@ -2740,7 +2740,7 @@ static int nv_zg_zw(cmdarg_T *cap, int nchar) len = spell_move_to(curwin, FORWARD, true, true, NULL); emsg_off--; if (len != 0 && curwin->w_cursor.col <= pos.col) { - ptr = (char *)ml_get_pos(&curwin->w_cursor); + ptr = ml_get_pos(&curwin->w_cursor); } curwin->w_cursor = pos; } @@ -3586,10 +3586,10 @@ bool get_visual_text(cmdarg_T *cap, char **pp, size_t *lenp) *lenp = strlen(*pp); } else { if (lt(curwin->w_cursor, VIsual)) { - *pp = (char *)ml_get_pos(&curwin->w_cursor); + *pp = ml_get_pos(&curwin->w_cursor); *lenp = (size_t)VIsual.col - (size_t)curwin->w_cursor.col + 1; } else { - *pp = (char *)ml_get_pos(&VIsual); + *pp = ml_get_pos(&VIsual); *lenp = (size_t)curwin->w_cursor.col - (size_t)VIsual.col + 1; } if (**pp == NUL) { @@ -4006,7 +4006,7 @@ static int normal_search(cmdarg_T *cap, int dir, char *pat, int opt, int *wrappe curwin->w_set_curswant = true; CLEAR_FIELD(sia); - int i = do_search(cap->oap, dir, dir, (char_u *)pat, cap->count1, + int i = do_search(cap->oap, dir, dir, pat, cap->count1, opt | SEARCH_OPT | SEARCH_ECHO | SEARCH_MSG, &sia); if (wrapped != NULL) { *wrapped = sia.sa_wrapped; |