Skip to content

Conversation

@glepnir
Copy link
Member

@glepnir glepnir commented Aug 22, 2025

Problem:
When a match containing multiple lines is preinserted, the cursor position becomes incorrect.

Solution:
Record the cursor position after inserting the match, and restore the original position after displaying the popup menu.

Fix #18081

Problem:
When a match containing multiple lines is preinserted, the cursor
position becomes incorrect.

Solution:
Record the cursor position after inserting the match, and restore
the original position after displaying the popup menu.
@ddad431
Copy link

ddad431 commented Aug 22, 2025

@glepnir I have tested this pr. But it haven't fix the problem. It just reset the cursor position to first char pos instead of respecting input char like single item.

Screen.Recording.2025-08-22.161248.mp4

@glepnir
Copy link
Member Author

glepnir commented Aug 22, 2025

forget new leader update later :)

@glepnir glepnir marked this pull request as draft August 22, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

completion: multi-line completion items can not work well with preinsert

2 participants