From c57e133e50b9f3ccd9a3d73f4e7e3e7281797000 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 3 Aug 2022 19:25:03 +0800 Subject: fix(ui): set redraw_cmdline when setting window height (#19630) --- test/functional/editor/tabpage_spec.lua | 2 +- test/functional/ui/statusline_spec.lua | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/functional/editor/tabpage_spec.lua b/test/functional/editor/tabpage_spec.lua index 7dd0b9f154..849a02c28b 100644 --- a/test/functional/editor/tabpage_spec.lua +++ b/test/functional/editor/tabpage_spec.lua @@ -59,7 +59,7 @@ describe('tabpage', function() screen:set_default_attr_ids({ [0] = {bold = true, foreground = Screen.colors.Blue}, [1] = {bold = true, reverse = true}, -- StatusLine - [2] = {reverse = true}, -- StatusLineNC, TabLineFill + [2] = {reverse = true}, -- TabLineFill [3] = {bold = true}, -- TabLineSel [4] = {background = Screen.colors.LightGrey, underline = true}, -- TabLine [5] = {bold = true, foreground = Screen.colors.Magenta}, diff --git a/test/functional/ui/statusline_spec.lua b/test/functional/ui/statusline_spec.lua index 69a2d2f4ed..f3735c8e4c 100644 --- a/test/functional/ui/statusline_spec.lua +++ b/test/functional/ui/statusline_spec.lua @@ -407,3 +407,40 @@ it('statusline does not crash if it has Arabic characters #19447', function() command('redraw!') assert_alive() end) + +it('statusline is redrawn with :resize from mapping #19629', function() + clear() + local screen = Screen.new(40, 8) + screen:set_default_attr_ids({ + [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [1] = {bold = true, reverse = true}, -- StatusLine + }) + screen:attach() + exec([[ + set laststatus=2 + nnoremap resize -1 + nnoremap resize +1 + ]]) + feed('') + screen:expect([[ + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {1:[No Name] }| + | + | + ]]) + feed('') + screen:expect([[ + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {1:[No Name] }| + | + ]]) +end) -- cgit