diff options
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/ui/statusline_spec.lua | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/test/functional/ui/statusline_spec.lua b/test/functional/ui/statusline_spec.lua index 5afa912be6..c47b26f55e 100644 --- a/test/functional/ui/statusline_spec.lua +++ b/test/functional/ui/statusline_spec.lua @@ -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() |