fix(completion): update CursorColumn during completion (#39159)

Since Nvim uses a compositor, redrawing windows won't lead to flicker in
the popup menu, so the pum_visible() checks in move.c can be removed.
This commit is contained in:
zeertzjq
2026-04-17 21:20:51 +08:00
committed by GitHub
parent fefad0721a
commit 724fccd46f
3 changed files with 104 additions and 4 deletions

View File

@@ -1523,6 +1523,100 @@ describe('CursorColumn highlight', function()
|
]])
end)
it('is updated with completion active #39153', function()
command('set autocomplete cursorcolumn')
feed('iasdf<CR>')
screen:expect([[
{21:a}sdf |
^ |
{1:~ }|*5
{5:-- INSERT --} |
]])
feed('a')
screen:expect([[
a{21:s}df |
a^ |
{4:asdf }{1: }|
{1:~ }|*4
{5:-- INSERT --} |
]])
feed('s')
screen:expect([[
as{21:d}f |
as^ |
{4:asdf }{1: }|
{1:~ }|*4
{5:-- INSERT --} |
]])
feed('d')
screen:expect([[
asd{21:f} |
asd^ |
{4:asdf }{1: }|
{1:~ }|*4
{5:-- INSERT --} |
]])
feed('f')
screen:expect([[
asdf{21: } |
asdf^ |
{4:asdf }{1: }|
{1:~ }|*4
{5:-- INSERT --} |
]])
feed('g')
screen:expect([[
asdf {21: } |
asdfg^ |
{1:~ }|*5
{5:-- INSERT --} |
]])
feed(' ')
screen:expect([[
asdf {21: } |
asdfg ^ |
{1:~ }|*5
{5:-- INSERT --} |
]])
feed('<BS>')
screen:expect([[
asdf {21: } |
asdfg^ |
{1:~ }|*5
{5:-- INSERT --} |
]])
feed('<BS>')
screen:expect([[
asdf{21: } |
asdf^ |
{4:asdf }{1: }|
{1:~ }|*4
{5:-- INSERT --} |
]])
feed('<BS>')
screen:expect([[
asd{21:f} |
asd^ |
{4:asdf }{1: }|
{1:~ }|*4
{5:-- INSERT --} |
]])
feed('h')
screen:expect([[
asdf{21: } |
asdh^ |
{1:~ }|*5
{5:-- INSERT --} |
]])
feed('<Esc>')
screen:expect([[
asd{21:f} |
asd^h |
{1:~ }|*5
|
]])
end)
end)
describe('ColorColumn highlight', function()