patch 9.1.1742: complete: preinsert does not work well with preinsert

Problem:  complete: preinsert does not work well with preinsert
Solution: Make "preinsert" completeopt value work with autocompletion
          (Girish Palya)

This change extends Insert mode autocompletion so that 'preinsert' also
works when 'autocomplete' is enabled.

Try: `:set ac cot=preinsert`

See `:help 'cot'` for more details.

closes: #18213

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Girish Palya
2025-09-08 15:23:29 -04:00
committed by Christian Brabandt
parent 4ed19fd336
commit fa6fd41a94
14 changed files with 364 additions and 50 deletions

View File

@ -269,6 +269,7 @@ static char *(highlight_init_both[]) = {
"default link PopupSelected PmenuSel",
"default link MessageWindow WarningMsg",
"default link PopupNotification WarningMsg",
"default link PreInsert Added",
CENT("Normal cterm=NONE", "Normal gui=NONE"),
NULL
};