mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 00:38:17 +00:00
lint
This commit is contained in:
@@ -2586,15 +2586,16 @@ void ins_compl_show_pum(void)
|
||||
// Need to build the popup menu list.
|
||||
compl_match_arraysize = 0;
|
||||
compl = compl_first_match;
|
||||
/*
|
||||
* If it's user complete function and refresh_always,
|
||||
* not use "compl_leader" as prefix filter.
|
||||
*/
|
||||
if (ins_compl_need_restart()){
|
||||
//
|
||||
// If it's user complete function and refresh_always,
|
||||
// do not use "compl_leader" as prefix filter.
|
||||
//
|
||||
if (ins_compl_need_restart()) {
|
||||
XFREE_CLEAR(compl_leader);
|
||||
}
|
||||
if (compl_leader != NULL)
|
||||
if (compl_leader != NULL) {
|
||||
lead_len = (int)STRLEN(compl_leader);
|
||||
}
|
||||
do {
|
||||
if ((compl->cp_flags & ORIGINAL_TEXT) == 0
|
||||
&& (compl_leader == NULL
|
||||
@@ -2993,7 +2994,7 @@ static void ins_compl_clear(void)
|
||||
XFREE_CLEAR(compl_leader);
|
||||
edit_submode_extra = NULL;
|
||||
XFREE_CLEAR(compl_orig_text);
|
||||
compl_enter_selects = FALSE;
|
||||
compl_enter_selects = false;
|
||||
// clear v:completed_item
|
||||
set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc());
|
||||
}
|
||||
|
@@ -4058,7 +4058,7 @@ skip:
|
||||
}
|
||||
|
||||
if (did_sub) {
|
||||
++sub_nlines;
|
||||
sub_nlines++;
|
||||
}
|
||||
xfree(new_start); // for when substitute was cancelled
|
||||
XFREE_CLEAR(sub_firstline); // free the copy of the original line
|
||||
|
@@ -1530,7 +1530,7 @@ static void cs_fill_results(char *tagstr, size_t totmatches, int *nummatches_a,
|
||||
} /* for all cscope connections */
|
||||
|
||||
if (totsofar == 0) {
|
||||
/* No matches, free the arrays and return NULL in "*matches_p". */
|
||||
// No matches, free the arrays and return NULL in "*matches_p".
|
||||
XFREE_CLEAR(matches);
|
||||
XFREE_CLEAR(cntxts);
|
||||
}
|
||||
|
@@ -3340,9 +3340,10 @@ static char *findswapname(buf_T *buf, char **dirp, char *old_fname,
|
||||
(char_u *)dir_name);
|
||||
|
||||
for (;; ) {
|
||||
if (fname == NULL) /* must be out of memory */
|
||||
if (fname == NULL) { // must be out of memory
|
||||
break;
|
||||
if ((n = strlen(fname)) == 0) { /* safety check */
|
||||
}
|
||||
if ((n = strlen(fname)) == 0) { // safety check
|
||||
XFREE_CLEAR(fname);
|
||||
break;
|
||||
}
|
||||
|
@@ -2997,7 +2997,7 @@ void give_warning(char_u *message, bool hl) FUNC_ATTR_NONNULL_ARG(1)
|
||||
/* Don't want a hit-enter prompt here. */
|
||||
++no_wait_return;
|
||||
|
||||
set_vim_var_string(VV_WARNINGMSG, (char *) message, -1);
|
||||
set_vim_var_string(VV_WARNINGMSG, (char *)message, -1);
|
||||
XFREE_CLEAR(keep_msg);
|
||||
if (hl) {
|
||||
keep_msg_attr = HL_ATTR(HLF_W);
|
||||
|
@@ -4291,7 +4291,7 @@ find_pattern_in_path(
|
||||
}
|
||||
}
|
||||
XFREE_CLEAR(new_fname);
|
||||
already_searched = TRUE;
|
||||
already_searched = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -5158,7 +5158,7 @@ static void syn_cmd_sync(exarg_T *eap, int syncing)
|
||||
|
||||
if (curwin->w_s->b_syn_linecont_prog == NULL) {
|
||||
XFREE_CLEAR(curwin->w_s->b_syn_linecont_pat);
|
||||
finished = TRUE;
|
||||
finished = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -4297,7 +4297,7 @@ static void win_enter_ext(win_T *wp, bool undo_sync, int curwin_invalid,
|
||||
}
|
||||
}
|
||||
XFREE_CLEAR(globaldir);
|
||||
shorten_fnames(TRUE);
|
||||
shorten_fnames(true);
|
||||
}
|
||||
|
||||
if (trigger_new_autocmds) {
|
||||
|
Reference in New Issue
Block a user