diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-06 19:24:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-06 19:24:42 +0800 |
commit | 7b973c71ea845c9bcc6d98e101ad5a7956cb5802 (patch) | |
tree | 2c9a87be4e34d0a42c1a7359424ee04db6d32de5 /test/functional/ui/statusline_spec.lua | |
parent | 780ab11b90119fb9b91d3266d6eef459228edc9a (diff) | |
download | rneovim-7b973c71ea845c9bcc6d98e101ad5a7956cb5802.tar.gz rneovim-7b973c71ea845c9bcc6d98e101ad5a7956cb5802.tar.bz2 rneovim-7b973c71ea845c9bcc6d98e101ad5a7956cb5802.zip |
fix(statusline): redraw when VIsual_mode changes (#23933)
Diffstat (limited to 'test/functional/ui/statusline_spec.lua')
-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() |