mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
fix(extmark): builtin completion can still affect nearby extmarks #31387
Problem:
Built-in completion can still affect nearby extmarks. #31384
Solution:
Restore extmarks when completion leader changes.
(cherry picked from commit c7ec010ade
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
163a532cfa
commit
e80e8a0980
@@ -1735,6 +1735,7 @@ static void ins_compl_new_leader(void)
|
|||||||
ins_compl_del_pum();
|
ins_compl_del_pum();
|
||||||
ins_compl_delete();
|
ins_compl_delete();
|
||||||
ins_bytes(compl_leader + get_compl_len());
|
ins_bytes(compl_leader + get_compl_len());
|
||||||
|
restore_orig_extmarks();
|
||||||
compl_used_match = false;
|
compl_used_match = false;
|
||||||
|
|
||||||
if (compl_started) {
|
if (compl_started) {
|
||||||
|
@@ -1188,5 +1188,15 @@ describe('completion', function()
|
|||||||
aaaaa |
|
aaaaa |
|
||||||
{5:-- INSERT --} |
|
{5:-- INSERT --} |
|
||||||
]])
|
]])
|
||||||
|
-- Also when completion leader is changed #31384
|
||||||
|
feed('<Esc>hi<C-N><C-P>a')
|
||||||
|
screen:expect({
|
||||||
|
grid = [[
|
||||||
|
{9:aa}a^aa |
|
||||||
|
{4:aaaa } |
|
||||||
|
{4:aaaaa } |
|
||||||
|
{5:-- Keyword completion (^N^P) }{19:Back at original} |
|
||||||
|
]],
|
||||||
|
})
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user