fix(statusline): redraw if Visual selection other end changes (#36281)

This commit is contained in:
zeertzjq
2025-10-23 11:27:23 +08:00
committed by GitHub
parent 323d5527ee
commit af0f7b59b1
3 changed files with 28 additions and 1 deletions

View File

@@ -656,6 +656,28 @@ describe('statusline', function()
]])
feed('<Esc>')
screen:expect(s2)
-- Visual selection other end change #36280
exec([[
function! DebugVisualSelection()
return printf("v %s %s", col("v"), col("."))
endfunction
set statusline=%!DebugVisualSelection()
]])
feed('iabc<Esc>v')
screen:expect([[
ab^c |
{1:~ }|*5
{3:v 3 3 }|
{5:-- VISUAL --} |
]])
feed('iw')
screen:expect([[
{17:ab}^c |
{1:~ }|*5
{3:v 1 3 }|
{5:-- VISUAL --} |
]])
end)
it('ruler is redrawn in cmdline with redrawstatus #22804', function()