aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/statusline.c2
-rw-r--r--test/functional/ui/winbar_spec.lua23
2 files changed, 24 insertions, 1 deletions
diff --git a/src/nvim/statusline.c b/src/nvim/statusline.c
index a6fd1d677b..5a14d57538 100644
--- a/src/nvim/statusline.c
+++ b/src/nvim/statusline.c
@@ -336,7 +336,7 @@ static void win_redr_custom(win_T *wp, bool draw_winbar, bool draw_ruler)
grid_adjust(&grid, &row, &col);
if (row < 0) {
- return;
+ goto theend;
}
fillchar = wp->w_p_fcs_chars.wbr;
diff --git a/test/functional/ui/winbar_spec.lua b/test/functional/ui/winbar_spec.lua
index 970f9c3d76..3b79f4328d 100644
--- a/test/functional/ui/winbar_spec.lua
+++ b/test/functional/ui/winbar_spec.lua
@@ -713,3 +713,26 @@ describe('local winbar with tabs', function()
]]}
end)
end)
+
+it('winbar works properly when redrawing is postponed #23534', function()
+ clear({args = {
+ '-c', 'set laststatus=2 lazyredraw',
+ '-c', 'setlocal statusline=(statusline) winbar=(winbar)',
+ '-c', 'call nvim_input(":<Esc>")',
+ }})
+ local screen = Screen.new(60, 6)
+ screen:attach()
+ screen:set_default_attr_ids({
+ [0] = {foreground = Screen.colors.Blue, bold = true},
+ [1] = {bold = true},
+ [2] = {bold = true, reverse = true},
+ })
+ screen:expect([[
+ {1:(winbar) }|
+ ^ |
+ {0:~ }|
+ {0:~ }|
+ {2:(statusline) }|
+ |
+ ]])
+end)