vim-patch:9.1.1772: completion: inconsistent selection of first item with 'autocomplete' (#35835)

Problem:  completion: inconsistent selection of first item with
          'autocomplete' (Tomasz N)
Solution: Check for 'autocomplete' option in ins_compl_new_leader()
          (Girish Palya).

fixes: vim/vim#18326
closes: vim/vim#18329

86e8e909f2

Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
zeertzjq
2025-09-19 10:47:53 +08:00
committed by GitHub
parent 95267b664c
commit e2166661d4
3 changed files with 69 additions and 2 deletions

View File

@@ -2274,7 +2274,7 @@ static void ins_compl_new_leader(void)
if ((cur_cot_flags & (kOptCotFlagNoinsert|kOptCotFlagNoselect)) == kOptCotFlagNoinsert
&& compl_first_match) {
compl_shown_match = compl_first_match;
if (compl_shows_dir_forward()) {
if (compl_shows_dir_forward() && !compl_autocomplete) {
compl_shown_match = compl_first_match->cp_next;
}
}