mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
fix(statusline): redraw when VIsual_mode changes
(cherry picked from commit 397d861566
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
55373061ab
commit
7e7fc4885f
@@ -627,11 +627,19 @@ it('K_EVENT does not trigger a statusline redraw unnecessarily', function()
|
||||
eq(1, eval('g:counter < 50'), 'g:counter=' .. eval('g:counter'))
|
||||
end)
|
||||
|
||||
it('statusline is redrawn on recording state change #22683', function()
|
||||
it('statusline is redrawn on various state changes', function()
|
||||
clear()
|
||||
local screen = Screen.new(40, 4)
|
||||
screen:attach()
|
||||
|
||||
-- recording state change #22683
|
||||
command('set ls=2 stl=%{repeat(reg_recording(),5)}')
|
||||
screen:expect([[
|
||||
^ |
|
||||
~ |
|
||||
|
|
||||
|
|
||||
]])
|
||||
feed('qQ')
|
||||
screen:expect([[
|
||||
^ |
|
||||
@@ -639,6 +647,50 @@ it('statusline is redrawn on recording state change #22683', function()
|
||||
QQQQQ |
|
||||
recording @Q |
|
||||
]])
|
||||
feed('q')
|
||||
screen:expect([[
|
||||
^ |
|
||||
~ |
|
||||
|
|
||||
|
|
||||
]])
|
||||
|
||||
-- Visual mode change #23932
|
||||
command('set ls=2 stl=%{mode(1)}')
|
||||
screen:expect([[
|
||||
^ |
|
||||
~ |
|
||||
n |
|
||||
|
|
||||
]])
|
||||
feed('v')
|
||||
screen:expect([[
|
||||
^ |
|
||||
~ |
|
||||
v |
|
||||
-- VISUAL -- |
|
||||
]])
|
||||
feed('V')
|
||||
screen:expect([[
|
||||
^ |
|
||||
~ |
|
||||
V |
|
||||
-- VISUAL LINE -- |
|
||||
]])
|
||||
feed('<C-V>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
~ |
|
||||
^V |
|
||||
-- VISUAL BLOCK -- |
|
||||
]])
|
||||
feed('<Esc>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
~ |
|
||||
n |
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('ruler is redrawn in cmdline with redrawstatus #22804', function()
|
||||
|
Reference in New Issue
Block a user