refactor: fix clang warnings (#19453)

This commit is contained in:
zeertzjq
2022-07-21 17:42:59 +08:00
committed by GitHub
parent c15e9d3746
commit 77b9f1eac5
3 changed files with 9 additions and 4 deletions

View File

@@ -2509,6 +2509,7 @@ static int ins_compl_get_exp(pos_T *ini)
} else if (ins_buf != curbuf && !buf_valid(ins_buf)) {
ins_buf = curbuf; // In case the buffer was wiped out.
}
assert(ins_buf != NULL);
compl_old_match = compl_curr_match; // remember the last current match
pos = (compl_direction == FORWARD) ? &last_match_pos : &first_match_pos;