[vim/vim] screen.c: extract opacity-blend helpers from screen_line() (PR #20154)

4 views
Skip to first unread message

mattn

unread,
May 6, 2026, 8:56:33 PM (24 hours ago) May 6
to vim/vim, Subscribed

screen_line() had four near-identical blocks computing popup_attr, combined attr, blend value and underlying base attr in sequence. Pull the shared computation into popup_blend_with_base() and popup_base_attr_or(), and cache per-popup attrs once via popup_opacity_T to avoid recomputing get_win_attr() (which pushes/pops highlight overrides) on every cell. The three top-level if/else if branches that all required the same precondition are also nested under a single outer guard, making the structure easier to follow.

No behavior change. test_popupwin (138 tests) and test_popupwin_textprop (3 tests) pass.


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

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

Commit Summary

  • 7ddeb11 screen.c: extract opacity-blend helpers from screen_line()

File Changes

(1 file)

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/20154@github.com>

Christian Brabandt

unread,
3:40 PM (5 hours ago) 3:40 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20154)

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

Christian Brabandt

unread,
3:44 PM (5 hours ago) 3:44 PM
to vim/vim, Subscribed

Closed #20154 via b9871ce.


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/20154/issue_event/25277277056@github.com>

Reply all
Reply to author
Forward
0 new messages