Skip to content

preinsert with autocomplete only inserts the longest completion #18314

@char101

Description

@char101

Steps to reproduce

  1. set completeopt=menuone,preinsert autocomplete
  2. type some text

I thought it would be interesting to have auto-completion candidate preinserted when typing, but trying preinsert with autocomplete results in only the longest text preinserted, even though completeopt does not contain longest.

hello
hella
he[ll] <- preinsert stops at ll

Expected behaviour

I expect preinsert to preinsert the first completion when autocomplete is running if completeopt does not contain longest.

Version of Vim

9.1.1754

Environment

Windows 10

Logs and stack traces

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions