hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.88k stars 393 forks source link

Fix: remove undo break when confirm complete #1867

Open zyd2001 opened 6 months ago

zyd2001 commented 6 months ago

When there is no snippet expansion, I expect cmp's behavior is the same as builtin omnifunc completion. The issue is after confirmation, the '[' mark and undo behavior is not matched. Undo will undo all input for that insert session but '[' mark is after previous completion.

https://github.com/hrsh7th/nvim-cmp/assets/25120292/e9f0d03b-8e87-48ec-a5b3-03309aee79b7

Omnifunc completion behavior and after the PR:

https://github.com/hrsh7th/nvim-cmp/assets/25120292/16045bc7-a0fe-4c5f-98a2-733ce383c33c