Problem: ins_compl_stop() sets compl_best_matches = 0, but that's a
pointer, should reset compl_num_bests instead,
find_common_prefix() reads cpt_sources_array[cur_source] without
checking cur_source != -1 which causes an OOB for -1,
find_next_completion_match(): second `if` in the pending loop
should be `else if`. Forward paging only moves one step per call.
Solution: Reset compl_num_bests instead, add a check for cur_source not
equal -1, change if to else if (glepnir)
closes: #20000
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
}
compl_autocomplete = FALSE;
compl_from_nonkeyword = FALSE;
- compl_best_matches = 0;
+ compl_num_bests = 0;
compl_ins_end_col = 0;
if (c == Ctrl_C && cmdwin_type != 0)
}
if (!match_limit_exceeded && (!curbuf_only
- || cpt_sources_array[cur_source].cs_flag == '.'))
+ || (cur_source != -1
+ && cpt_sources_array[cur_source].cs_flag == '.')))
{
if (first == NULL && STRNCMP(ins_compl_leader(),
compl->cp_str.string, ins_compl_leader_len()) == 0)
compl_shown_match = compl_shown_match->cp_next;
--compl_pending;
}
- if (compl_pending < 0 && compl_shown_match->cp_prev != NULL)
+ else if (compl_pending < 0 && compl_shown_match->cp_prev != NULL)
{
compl_shown_match = compl_shown_match->cp_prev;
++compl_pending;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 380,
/**/
379,
/**/