[vim/vim] Add "clipwindow" popup option to confine popup to host window (PR #20166)

3 views
Skip to first unread message

mattn

unread,
4:56 AM (9 hours ago) 4:56 AM
to vim/vim, Subscribed

Adds a new "clipwindow" boolean option for popup_create()/popup_setoptions(). When set on a textprop-anchored popup, the popup's drawn extent is confined to its host (textprop) window's content rectangle, so it no longer bleeds across a horizontal split's statusline or a vsplit's separator into another window.

The popup keeps its full logical size and position; only the rows or columns that fall outside the host window's content area are skipped at draw time. As the textprop scrolls toward the host's edge the popup looks visually "cut off" without its borders being relocated, and is hidden once it has fully scrolled past. popup_getoptions() and popup_getpos() continue to report the unclipped geometry.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20166

Commit Summary

  • 84a4f7d add clipwindow popup option
  • 21be5d1 fix top-clip animation for clipwindow popup
  • 2cd9f23 factor out clipwindow geometry math
  • f0a655e extract popup_geom_save_T and popup_screenpos_above_top
  • c0abfcb extract clipwindow helpers and reuse popup_clip_T
  • e1c37ba add tests for clipwindow popup option

File Changes

(6 files)

Patch Links:


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.Message ID: <vim/vim/pull/20166@github.com>

mattn

unread,
10:45 AM (3 hours ago) 10:45 AM
to vim/vim, Push

@mattn pushed 1 commit.

  • f0a5422 document clipwindow popup option


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.Message ID: <vim/vim/pull/20166/before/e1c37ba82782edbdd9b5924cba80eab10aa0d394/after/f0a542212247d6717e3dffc51b5dcf1bfa89f43a@github.com>

Reply all
Reply to author
Forward
0 new messages