popup_adjust_position() decides whether to refresh popup_mask by comparing a fixed set of fields (w_winrow, w_wincol, w_leftcol, w_popup_leftoff, w_width, w_height). It does not consider w_has_scrollbar, and w_width is the popup's inner content width, which doesn't include the scrollbar column. So when popup_settext() shrinks the buffer enough that the scrollbar disappears, none of the tracked fields change, the mask refresh is skipped, and the cell that held the old border / scrollbar is never repainted, leaving stray characters on the right of the popup.
The regression was introduced in 9.2.0112, which replaced the global redraw_win_later(UPD_NOT_VALID) in f_popup_settext() with a popup-local redraw. Before that, the global must_redraw propagation forced may_update_popup_mask() to refresh the mask anyway, masking this gap.
For a centered popup, losing the scrollbar drops extra_width by 1, so w_wincol = (Columns - w_width - extra_width) / 2 would normally shift by 1 and trip the existing org_wincol != w_wincol branch. Whether the shift actually happens depends on the parity of Columns due to integer truncation, so the bug only surfaced at odd terminal widths or with pos: 'topleft' popups whose w_wincol is anchored.
Fix: also compare w_has_scrollbar in the change detection.
Closes #20092
https://github.com/vim/vim/pull/20098
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
I'll add test.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@mattn pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@mattn pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()