vim-patch:9.1.1742: complete: preinsert does not work well with 'autocomplete' (#35692)

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: vim/vim#18213

fa6fd41a94

Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
zeertzjq
2025-09-09 11:35:41 +08:00
committed by GitHub
parent c553008e74
commit eb19206e03
16 changed files with 382 additions and 78 deletions

View File

@@ -85,6 +85,7 @@ EXTERN const char *hlf_names[] INIT( = {
[HLF_BFOOTER] = "FloatFooter",
[HLF_TS] = "StatusLineTerm",
[HLF_TSNC] = "StatusLineTermNC",
[HLF_PRE] = "PreInsert",
});
EXTERN int highlight_attr[HLF_COUNT]; // Highl. attr for each context.