minad / corfu

:desert_island: corfu.el - COmpletion in Region FUnction
GNU General Public License v3.0
1.06k stars 42 forks source link

Corfu inserts rest of completion twice #399

Closed accelbread closed 6 months ago

accelbread commented 6 months ago

Hi, I'm having trouble debugging an issue I am facing with corfu.

When I have text "ab" with available completion "abcd" and I hit TAB (corfu-complete), I end up with "abcdcd" instead of "abcd" with the cursor between the "cd"s (i.e.: "abcd|cd"). It is visible that the first insertion happens before the cursor and then the second after the cursor.

This occurs with the Eglot capf but not with cape-dabbrev or cape-file. I have not tested others.

This only happens with TAB (corfu-complete), but not with RET (corfu-insert).

I've tested with orderless and without, happens in both cases.

I am on Emacs 29.

Is there other steps I should take to debug this issue or is there more information that would be helpful?