Completing Unicode (using \k regex) is broken because common prefix uses bytes instead of characters
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by tracing the buffer completion path that calculates the common prefix, then reproduce the Cyrillic example from the issue and inspect how UTF-8 text is measured. Done means completing "пол" from the shown words preserves characters and no longer inserts broken byte-based text.
Written by the indexing model from the issue text.
Description
Here is an example:
# Add some text to provide source words:
получаем битый символ
получив битый символ
# Then type "пол" and attempt to complete it result in adding broken unicode "учÐ":
получÐ
This happens because Cyrillic "а" in UTF8 is 0xD0 0xB0 and Cyrillic "и" in UTF8 is 0xD0 0xB8, so completion returns common part Latin Capital Letter Eth 0xD0.
- Dominant language
- Lua
- Stars
- 672
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hrsh7th/cmp-buffer
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
hrsh7th/cmp-buffer#65 · 2 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
hrsh7th/cmp-buffer#84 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 52/100
hrsh7th/cmp-buffer#82 · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
hrsh7th/cmp-buffer#81 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
hrsh7th/cmp-buffer#78 ·
All issues in hrsh7th/cmp-buffer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
api7/lua-resty-saml#62 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nvim-tree/nvim-tree.lua#3357 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
codymikol/multiverse.nvim#320 ·
-
Data Correction tbc
Difficulty 2/5 1-3 hours Newbie friendliness 68/100