patch 9.2.0715: Coverity warns about copy/paste error in hl_blend_attr()
Commit:
https://github.com/vim/vim/commit/f67e912ffefb6a9f0ddb2f7dc123e34a552d1f11
Author: Christian Brabandt <
c...@256bit.org>
Date: Wed Jun 24 17:30:22 2026 +0000
patch 9.2.0715: Coverity warns about copy/paste error in hl_blend_attr()
Problem: Coverity warns about copy/paste error in hl_blend_attr()
Solution: Use foreground color instead, regenerate dump
closes: #20624
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/highlight.c b/src/highlight.c
index 325e5d65f..717a8f5fb 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -3581,7 +3581,7 @@ hl_blend_attr(int char_attr, int popup_attr, int blend, int blend_fg UNUSED)
under_fg_rgb = char_aep->ae_u.cterm.fg_rgb;
#endif
new_en.ae_u.cterm.fg_color = blend_cterm_colors(
- popup_aep->ae_u.cterm.bg_color, popup_bg_rgb,
+ popup_aep->ae_u.cterm.fg_color, popup_bg_rgb,
under_fg, under_fg_rgb, fallback_fg_rgb, blend);
}
// Approximate cterm bg by blending with the underlying bg
@@ -3768,7 +3768,7 @@ hl_pum_blend_attr(int char_attr, int popup_attr, int blend UNUSED)
popup_bg_rgb = popup_aep->ae_u.cterm.bg_rgb;
#endif
new_en.ae_u.cterm.fg_color = blend_cterm_colors(
- popup_aep->ae_u.cterm.bg_color, popup_bg_rgb,
+ popup_aep->ae_u.cterm.fg_color, popup_bg_rgb,
under_fg, under_fg_rgb, fallback_fg_rgb, blend);
}
// Approximate cterm bg by blending with the underlying bg
diff --git a/src/testdir/dumps/Test_popupwin_opacity_hl_80.dump b/src/testdir/dumps/Test_popupwin_opacity_hl_80.dump
index c57365eaa..78d311545 100644
--- a/src/testdir/dumps/Test_popupwin_opacity_hl_80.dump
+++ b/src/testdir/dumps/Test_popupwin_opacity_hl_80.dump
@@ -1,7 +1,7 @@
>1+0&#ffffff0| @73
|2| @73
-|3| @7|f+0#ff404010#87d7ff255|o@1| +0#5fafd7255&@1|b+0#0000001&|a|r| +0#0000000#ffffff0@57
-|4| @7|b+0#0000001#87d7ff255|a|z| +0#5fafd7255&@4| +0#0000000#ffffff0@57
+|3| @7|f+0#ff404010#87d7ff255|o@1| +0#d75f5f255&@1|b+0#0000001&|a|r| +0#0000000#ffffff0@57
+|4| @7|b+0#0000001#87d7ff255|a|z| +0#0000000&@4| +0&#ffffff0@57
|5| @73
|6| @73
|7| @73
diff --git a/src/version.c b/src/version.c
index 5a42a1ef1..de6662811 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 715,
/**/
714,
/**/