From 8fd66ff5c57d29a4349c80d3ae769cde12357ac0 Mon Sep 17 00:00:00 2001 From: bfredl Date: Mon, 29 Aug 2022 21:58:07 +0200 Subject: fix(redraw): handle switching to a tabpage with larger p_ch value --- src/nvim/window.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/nvim/window.c b/src/nvim/window.c index 29b1b05ade..832cb82bda 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -4343,6 +4343,11 @@ static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, bool trigger_enter_a // Use the stored value of p_ch, so that it can be different for each tab page. if (p_ch != curtab->tp_ch_used) { clear_cmdline = true; + if (msg_grid.chars && p_ch < curtab->tp_ch_used) { + // TODO(bfredl): a bit expensive, should be enough to invalidate the + // region between the old and the new p_ch. + grid_invalidate(&msg_grid); + } } p_ch = curtab->tp_ch_used; -- cgit