patch 9.2.0260: statusline not redrawn after closing a popup window
Commit:
https://github.com/vim/vim/commit/575961c791b54ee4c9c38dd3e23850276d911b3e
Author: Yasuhiro Matsumoto <[email protected]>
Date: Thu Mar 26 21:19:34 2026 +0000
patch 9.2.0260: statusline not redrawn after closing a popup window
Problem: When a popup window overlapping a status line is closed or
hidden, the status line is not redrawn, leaving ghost
artifacts from the popup.
Solution: popup_free() and popup_hide() call
redraw_all_later(UPD_NOT_VALID) which marks window contents
for redraw but does not set w_redr_status. The diff-based path
in may_update_popup_mask() that normally sets w_redr_status
is skipped when redrawing_all_win is TRUE. Add status_redraw_all
calls to ensure status lines are properly redrawn
(Yasuhiro Matsumoto).
closes: #19830
Signed-off-by: Yasuhiro Matsumoto <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/popupwin.c b/src/popupwin.c
index f14e970e9..ab207cd50 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -3033,6 +3033,7 @@ popup_hide(win_T *wp)
if (wp->w_winrow + popup_height(wp) >= cmdline_row)
clear_cmdline = TRUE;
redraw_all_later(UPD_NOT_VALID);
+ status_redraw_all();
popup_mask_refresh = TRUE;
}
@@ -3196,6 +3197,7 @@ popup_free(win_T *wp)
#endif
redraw_all_later(UPD_NOT_VALID);
+ status_redraw_all();
popup_mask_refresh = TRUE;
}
diff --git a/src/testdir/dumps/Test_popupwin_close_status_1.dump
b/src/testdir/dumps/Test_popupwin_close_status_1.dump
new file mode 100644
index 000000000..09a11f8e3
--- /dev/null
+++ b/src/testdir/dumps/Test_popupwin_close_status_1.dump
@@ -0,0 +1,15 @@
+>1+0&#ffffff0| @73
+|2| @73
+|3| @73
+|4| @73
+|5| @73
+|6| @73
+|[+3&&|N|o| |p+0#0000001#ffd7ff255|o|p|u|p| |o|v|e|r| |s|t|a|t|u|s|l|i|n|e|
+3#0000000#ffffff0@31|1|,|1| @11|T|o|p
+|1+0&&| @73
+|2| @73
+|3| @73
+|4| @73
+|5| @73
+|6| @73
+|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|1| @11|T|o|p
+| +0&&@74
diff --git a/src/testdir/dumps/Test_popupwin_close_status_2.dump
b/src/testdir/dumps/Test_popupwin_close_status_2.dump
new file mode 100644
index 000000000..84ae15663
--- /dev/null
+++ b/src/testdir/dumps/Test_popupwin_close_status_2.dump
@@ -0,0 +1,15 @@
+>1+0&#ffffff0| @73
+|2| @73
+|3| @73
+|4| @73
+|5| @73
+|6| @73
+|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|1| @11|T|o|p
+|1+0&&| @73
+|2| @73
+|3| @73
+|4| @73
+|5| @73
+|6| @73
+|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|1| @11|T|o|p
+|:+0&&|c|a|l@1| |p|o|p|u|p|_|c|l|o|s|e|(|w|i|n|i|d|)| @50
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 38b1c6969..57dd03ed9 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -5080,4 +5080,26 @@ func Test_popup_close_b_nwindows()
call assert_equal(0, bufexists('Xfoo'))
endfunc
+func Test_popupwin_close_status_redraw()
+ CheckScreendump
+
+ let lines =<< trim END
+ split
+ call setline(1, range(1, 20))
+ let winid = popup_create('popup over statusline', #{
+ \ line: &lines / 2,
+ \ col: 5,
+ \ })
+ END
+ call writefile(lines, 'XtestPopupCloseStatus', 'D')
+ let buf = RunVimInTerminal('-S XtestPopupCloseStatus', #{rows: 15})
+ call VerifyScreenDump(buf, 'Test_popupwin_close_status_1', {})
+
+ " close the popup and check the status line is redrawn
+ call term_sendkeys(buf, ":call popup_close(winid)\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_close_status_2', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2
diff --git a/src/version.c b/src/version.c
index a0bd233d1..cac2d1837 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 260,
/**/
259,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1w5sHD-007TkQ-5g%40256bit.org.