When popup_setoptions() is called to update only firstline (e.g. scrolling via a timer), windows behind the popup flicker because a full popup mask refresh and UPD_NOT_VALID redraw are triggered every time, even though the popup's position and size haven't changed.
This patch distinguishes content-only changes (firstline, highlights) from structural ones (zindex, popup_flags, blend). For content-only changes, skip the mask refresh and popup_adjust_position(), and use UPD_VALID instead of UPD_NOT_VALID so only the popup itself is redrawn.
" Reproducer let s:id = popup_create(range(1, 50)->map({i, v -> $"line {v}"}), { \ 'pos': 'center', 'minwidth': 60, 'maxheight': 10, 'border': [], \ }) let s:n = 1 function! s:scroll(timer) abort let s:n = s:n % 50 + 1 call popup_setoptions(s:id, {'firstline': s:n}) endfunction call timer_start(500, function('s:scroll'), {'repeat': -1})
https://github.com/vim/vim/pull/19559
(1 file)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Found errors in Test_popup_firstline():
command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_popup_firstline line 30: Expected 11 but got 10
command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_popup_firstline line 36: Expected 10 but got 9
command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_popup_firstline line 41: Expected 10 but got 9
Test is failing but I can judge whether the problem is depend on firstline or not.
—
Reply to this email directly, view it on GitHub.
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.![]()
Also, opacity: 100 (fully opaque) now clears the POPF_OPACITY flag so the popup behaves exactly like a normal popup without opacity. The transparency rendering path is only used for opacity: 1-99.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
What this pull request fixes
See #19510
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()