This PR fixes several issues related to popup window rendering and option handling in Vim.
When using popup_move() to move a popup window (e.g., with hjkl keys in the vim-popup-manager plugin), ghost images of the popup remained on the screen. The old position was not being redrawn.
Modified f_popup_move() in popupwin.c to save the old position before moving and force a full redraw when the position changes.
When calling popup_setoptions() with visual options like borderhighlight, scrollbarhighlight, thumbhighlight, zindex, or cursorline flags, the changes were not immediately visible because no redraw was triggered.
Enhanced f_popup_setoptions() to check for changes in visual-affecting options and trigger a redraw when any of them change:
firstline (already existed)zindexscrollbarhighlightthumbhighlightborderhighlight arraySetting borderhighlight: [] did not clear the border highlights. The loop that processed the list only updated highlights when the list had items, so an empty list would not clear existing highlights.
Modified the borderhighlight processing in apply_general_options() to explicitly clear all border highlights when an empty list is provided.
src/popupwin.c: Core fixes for popup renderingsrc/testdir/test_popupwin.vim: Added test for borderhighlight clearing" Check that borderhighlight can be cleared with empty list call popup_setoptions(winid, #{borderhighlight: []}) let options_cleared = popup_getoptions(winid) call assert_equal([], options_cleared.borderhighlight)
borderhighlight clearing:
let winid = popup_create('test', #{border: [], borderhighlight: ['WarningMsg']}) call popup_setoptions(winid, #{borderhighlight: []}) " Border highlight should now be cleared
https://github.com/vim/vim/pull/19297
(2 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Thanks, can you please fix the CI errors?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()