diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-23 06:40:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-23 06:40:26 +0800 |
commit | 3688735c2b63337ab8d8b12ac08b4e6e064e98a2 (patch) | |
tree | 648efd366587e9f3b17f81b2b451401c6f0dc90f /test/functional/ui/cmdline_spec.lua | |
parent | 12c2c16acf7051d364d29cfd71f2542b0943d8e8 (diff) | |
download | rneovim-3688735c2b63337ab8d8b12ac08b4e6e064e98a2.tar.gz rneovim-3688735c2b63337ab8d8b12ac08b4e6e064e98a2.tar.bz2 rneovim-3688735c2b63337ab8d8b12ac08b4e6e064e98a2.zip |
fix(cmdline): don't redraw 'tabline' in Ex mode (#24123)
Redrawing of 'statusline' and 'winbar' are actually already inhibited by
RedawingDisabled in Ex mode.
In Vim there is a check for `msg_scrolled == 0` (which is false in Ex
mode) since Vim doesn't have msgsep. Add a `!exmode_active` check here
in Nvim instead.
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r-- | test/functional/ui/cmdline_spec.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua index a9469bdf2d..dc29b765bd 100644 --- a/test/functional/ui/cmdline_spec.lua +++ b/test/functional/ui/cmdline_spec.lua @@ -944,6 +944,45 @@ describe('statusline is redrawn on entering cmdline', function() end) end) +it('tabline is not redrawn in Ex mode #24122', function() + clear() + local screen = Screen.new(60, 5) + screen:set_default_attr_ids({ + [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [1] = {bold = true, reverse = true}, -- MsgSeparator + [2] = {reverse = true}, -- TabLineFill + }) + screen:attach() + + exec([[ + set showtabline=2 + set tabline=%!MyTabLine() + + function! MyTabLine() + + return "foo" + endfunction + ]]) + + feed('gQ') + screen:expect{grid=[[ + {2:foo }| + | + {1: }| + Entering Ex mode. Type "visual" to go to Normal mode. | + :^ | + ]]} + + feed('echo 1<CR>') + screen:expect{grid=[[ + {1: }| + Entering Ex mode. Type "visual" to go to Normal mode. | + :echo 1 | + 1 | + :^ | + ]]} +end) + describe("cmdline height", function() it("does not crash resized screen #14263", function() clear() |