diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-08-25 22:35:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 22:35:20 +0200 |
commit | 6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0 (patch) | |
tree | 163d6c0553e6c9f7a91d7d0d97e369722dca75be /src/nvim/insexpand.c | |
parent | bfd1adc62c615e7b65bdfe6d3c21158708eb4314 (diff) | |
parent | 40855b0143a864739a6037921e15699445dcf8a7 (diff) | |
download | rneovim-6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0.tar.gz rneovim-6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0.tar.bz2 rneovim-6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0.zip |
Merge pull request #19628 from dundargoc/refactor/char_u/2
refactor: replace char_u with char
Diffstat (limited to 'src/nvim/insexpand.c')
-rw-r--r-- | src/nvim/insexpand.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index c92183dc2a..a3b5e3df5c 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -901,7 +901,7 @@ static void ins_compl_longest_match(compl_T *match) had_match = (curwin->w_cursor.col > compl_col); ins_compl_delete(); - ins_bytes(compl_leader + get_compl_len()); + ins_bytes((char *)compl_leader + get_compl_len()); ins_redraw(false); // When the match isn't there (to avoid matching itself) remove it @@ -935,7 +935,7 @@ static void ins_compl_longest_match(compl_T *match) *p = NUL; had_match = (curwin->w_cursor.col > compl_col); ins_compl_delete(); - ins_bytes(compl_leader + get_compl_len()); + ins_bytes((char *)compl_leader + get_compl_len()); ins_redraw(false); // When the match isn't there (to avoid matching itself) remove it @@ -1677,7 +1677,7 @@ static void ins_compl_new_leader(void) { ins_compl_del_pum(); ins_compl_delete(); - ins_bytes(compl_leader + get_compl_len()); + ins_bytes((char *)compl_leader + get_compl_len()); compl_used_match = false; if (compl_started) { @@ -2224,11 +2224,11 @@ static char_u *get_complete_funcname(int type) { switch (type) { case CTRL_X_FUNCTION: - return curbuf->b_p_cfu; + return (char_u *)curbuf->b_p_cfu; case CTRL_X_OMNI: - return curbuf->b_p_ofu; + return (char_u *)curbuf->b_p_ofu; case CTRL_X_THESAURUS: - return *curbuf->b_p_tsrfu == NUL ? p_tsrfu : curbuf->b_p_tsrfu; + return *curbuf->b_p_tsrfu == NUL ? p_tsrfu : (char_u *)curbuf->b_p_tsrfu; default: return (char_u *)""; } @@ -2823,8 +2823,8 @@ static void get_next_dict_tsr_completion(int compl_type, char_u *dict, int dict_ } else { ins_compl_dictionaries(dict != NULL ? dict : (compl_type == CTRL_X_THESAURUS - ? (*curbuf->b_p_tsr == NUL ? p_tsr : curbuf->b_p_tsr) - : (*curbuf->b_p_dict == NUL ? p_dict : curbuf->b_p_dict)), + ? (*curbuf->b_p_tsr == NUL ? p_tsr : (char_u *)curbuf->b_p_tsr) + : (*curbuf->b_p_dict == NUL ? p_dict : (char_u *)curbuf->b_p_dict)), (char_u *)compl_pattern, dict != NULL ? dict_f : 0, compl_type == CTRL_X_THESAURUS); @@ -3174,7 +3174,7 @@ static int ins_compl_get_exp(pos_T *ini) } st.found_all = false; st.ins_buf = curbuf; - st.e_cpt = (compl_cont_status & CONT_LOCAL) ? "." : (char *)curbuf->b_p_cpt; + st.e_cpt = (compl_cont_status & CONT_LOCAL) ? "." : curbuf->b_p_cpt; st.last_match_pos = st.first_match_pos = *ini; } else if (st.ins_buf != curbuf && !buf_valid(st.ins_buf)) { st.ins_buf = curbuf; // In case the buffer was wiped out. @@ -3319,7 +3319,7 @@ void ins_compl_delete(void) /// "in_compl_func" is true when called from complete_check(). void ins_compl_insert(bool in_compl_func) { - ins_bytes(compl_shown_match->cp_str + get_compl_len()); + ins_bytes((char *)compl_shown_match->cp_str + get_compl_len()); compl_used_match = !match_at_original_text(compl_shown_match); dict_T *dict = ins_compl_dict_alloc(compl_shown_match); @@ -3511,13 +3511,13 @@ static int ins_compl_next(bool allow_get_expansion, int count, bool insert_match // Insert the text of the new completion, or the compl_leader. if (compl_no_insert && !started) { - ins_bytes(compl_orig_text + get_compl_len()); + ins_bytes((char *)compl_orig_text + get_compl_len()); compl_used_match = false; } else if (insert_match) { if (!compl_get_longest || compl_used_match) { ins_compl_insert(in_compl_func); } else { - ins_bytes(compl_leader + get_compl_len()); + ins_bytes((char *)compl_leader + get_compl_len()); } } else { compl_used_match = false; @@ -4079,9 +4079,9 @@ static int ins_compl_start(void) edit_submode_pre = (char_u *)_(" Adding"); if (ctrl_x_mode_line_or_eval()) { // Insert a new line, keep indentation but ignore 'comments'. - char_u *old = curbuf->b_p_com; + char *old = curbuf->b_p_com; - curbuf->b_p_com = (char_u *)""; + curbuf->b_p_com = ""; compl_startpos.lnum = curwin->w_cursor.lnum; compl_startpos.col = compl_col; ins_eol('\r'); |