[vim/vim] fix: typo in stop, OOB in prefix, asymmetric pending loop (PR #20000)

2 views
Skip to first unread message

glepnir

unread,
Apr 17, 2026, 10:14:28 PM (12 hours ago) Apr 17
to vim/vim, Subscribed

Problem:

  1. ins_compl_stop sets compl_best_matches = 0, but that's a pointer. Meant to reset the counter compl_num_bests.
  2. find_common_prefix reads cpt_sources_array[cur_source] without checking cur_source != -1. OOB when it's -1.
  3. find_next_completion_match: second if in the pending loop should be else if. Forward paging only moves one step per call.

Solution:

  1. Reset compl_num_bests instead.
  2. Add the -1 guard.
  3. Change if to else if.

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20000

Commit Summary

  • 44f355e fix: typo in stop, OOB in prefix, asymmetric pending loop

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20000@github.com>

Reply all
Reply to author
Forward
0 new messages