]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0715: Coverity warns about copy/paste error in hl_blend_attr() v9.2.0715
authorChristian Brabandt <cb@256bit.org>
Wed, 24 Jun 2026 17:30:22 +0000 (17:30 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 24 Jun 2026 17:30:22 +0000 (17:30 +0000)
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 <cb@256bit.org>
src/highlight.c
src/testdir/dumps/Test_popupwin_opacity_hl_80.dump
src/version.c

index 325e5d65f04ad184fc2dca005c60e9712afbb0fc..717a8f5fb66cdfe502e630fa870cd5b99a0800bb 100644 (file)
@@ -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
index c57365eaae9c4bde79fb59e2eac77b010ca09f9b..78d311545079b0356bbdabdfc9799b7463e05d14 100644 (file)
@@ -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
index 5a42a1ef14016734f08f7915f23e3644e7fe959c..de6662811da51547ad911b28849cd352e48bbe87 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    715,
 /**/
     714,
 /**/