]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0452: screen.c popup opacity blend logic is duplicated v9.2.0452
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Thu, 7 May 2026 19:40:16 +0000 (19:40 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 7 May 2026 19:40:16 +0000 (19:40 +0000)
commitb9871cef1073dfbcb74b73d9b939b374d6bd50e5
treeeec703b5c1e56e58400ef54c62d4d31c369e5dae
parent58124789aaf98fd96cd94a738633fd652a5e079a
patch 9.2.0452: screen.c popup opacity blend logic is duplicated

Problem:  screen_line() has four near-identical blocks computing
          the popup_attr, the combined attr, the blend value and
          the underlying base attr in sequence when handling popups
          with opacity.  The duplication makes the function long
          and hard to follow, and changes have to be applied to all
          four sites.
Solution: Extract the shared computation into popup_blend_with_base()
          and popup_base_attr_or() helpers, and cache per-popup
          attrs once via popup_opacity_T.  No behavior change
          (Yasuhiro Matsumoto).

closes: #20154

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/screen.c
src/version.c