]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0332: popup: still opacity rendering issues master v9.2.0332
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Fri, 10 Apr 2026 17:43:59 +0000 (17:43 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 10 Apr 2026 17:43:59 +0000 (17:43 +0000)
commit7e0eb5271e455beee52bd3f444bb68052900dfd5
treecbc3fb25423e1f8b0124c3521af54b83e0b4f0b1
parent07faa961a05bc5ea007ab70ff483ea1b32c3371d
patch 9.2.0332: popup: still opacity rendering issues

Problem:  popup: still opacity rendering issues
Solution: Fix remaining issues, see below
          (Yasuhiro Matsumoto).

This PR fixes the following issues:

- Padding blend hole at wide char boundary: when a padding cell overlaps
  the second half of a wide character, the right half's attr value is
  unreliable. Use the left half's saved attr for blending instead.

- Wide char background split at popup boundary: when a wide character in
  an upper popup straddles the edge of a lower opacity popup, both
  halves got different background colors. Since terminals cannot render
  different left/right background colors for a wide character, detect
  the lower popup with popup_is_over_opacity() and use the non-popup
  side's underlying attr for both halves.

- Wrong blend color with cterm-only highlights under 'termguicolors':
  when a popup highlight has ctermbg but no guibg, bg_rgb is set to
  CTERMCOLOR (not INVALCOLOR). hl_blend_attr() used this value as a real
  RGB color, producing gray instead of the intended color. Use
  COLOR_INVALID() to detect both INVALCOLOR and CTERMCOLOR, and fall back
  to converting the cterm color number to RGB.

closes: #19943

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/highlight.c
src/popupwin.c
src/proto/popupwin.pro
src/screen.c
src/testdir/dumps/Test_popupwin_opacity_wide_1.dump
src/testdir/dumps/Test_popupwin_opacity_wide_2.dump
src/testdir/test_popupwin.vim
src/version.c