Skip to content

PMenu selection is not retained if multiline text is inserted #17394

@habamax

Description

@habamax

Steps to reproduce

If inserted text is multilined it could shift selected pmenu item to another one:

asciicast

In the asciicast you can see that after selecting the second item it inserts contents but selection is shifted to the first(previous) menu item.

Will try to come up with a simple reproducible steps later.

Context: I have added registers completion source for custom autocomplete to be able to complete the whole contents of registers in contrast to CTRL-X CTRL-R that completes only words from registers.

Expected behaviour

Selection in Pmenu should be retained

Version of Vim

9.1.1418

Environment

Debian12, bash

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