mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0520: Reversed text opacity in popup when termguicolor is set
Problem: When termguicolor is set, popup opacity seems reversed
for the underlying text: when opacity go from 1 to 99,
the greater opacity is, the more underlying text is readable.
Solution: Invert popup_color and base_fg when calling blend_colors
(Shad).
fixes: #20283
closes: #20284
Signed-off-by: Shad <shadow.walker@free.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
+3
-3
@@ -3303,7 +3303,7 @@ blend_cterm_colors(int popup_c, guicolor_T popup_rgb,
|
||||
#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
|
||||
/*
|
||||
* Blend two RGB colors based on blend value (0-100).
|
||||
* blend: 0=use popup color, 100=use background color
|
||||
* blend: 0=return first argument color, 100=return second argument color
|
||||
* If bg_color is INVALCOLOR, high blend means more visible (return INVALCOLOR).
|
||||
*/
|
||||
static guicolor_T
|
||||
@@ -3397,7 +3397,7 @@ hl_blend_attr(int char_attr, int popup_attr, int blend, int blend_fg UNUSED)
|
||||
&& char_aep->ae_u.gui.fg_color != INVALCOLOR)
|
||||
base_fg = char_aep->ae_u.gui.fg_color;
|
||||
new_en.ae_u.gui.fg_color = blend_colors(
|
||||
base_fg, popup_aep->ae_u.gui.bg_color, blend);
|
||||
popup_aep->ae_u.gui.bg_color, base_fg, blend);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3537,7 +3537,7 @@ hl_blend_attr(int char_attr, int popup_attr, int blend, int blend_fg UNUSED)
|
||||
&& !COLOR_INVALID(char_aep->ae_u.cterm.fg_rgb))
|
||||
base_fg = char_aep->ae_u.cterm.fg_rgb;
|
||||
new_en.ae_u.cterm.fg_rgb = blend_colors(
|
||||
base_fg, popup_bg, blend);
|
||||
popup_bg, base_fg, blend);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
>a+0&#ffffff0@2| |b@2| |c|P+0#e5e9f0255#03050b255|O|P|U|P|d+0#61646f255&|C+0#e5e9f0255&|O|N|T|E|N|T|f+0#61646f255&| |g@2| |h@2| @7| +0#0000000#ffffff0@10
|
||||
|i@2| |j@2| |k|k+0#61646f255#03050b255@1| |l@2| |m@2| |n@2| |o@2| |p@2| @7| +0#0000000#ffffff0@10
|
||||
|q@2| |r@2| |s|s+0#61646f255#03050b255@1| |m+0#e5e9f0255&|i|d@1|l|e|u+0#61646f255&| |v@2| |w@2| |x@2| @7| +0#0000000#ffffff0@10
|
||||
>a+0&#ffffff0@2| |b@2| |c|P+0#e5e9f0255#03050b255|O|P|U|P|d+0#a9abb1255&|C+0#e5e9f0255&|O|N|T|E|N|T|f+0#a9abb1255&| |g@2| |h@2| @7| +0#0000000#ffffff0@10
|
||||
|i@2| |j@2| |k|k+0#a9abb1255#03050b255@1| |l@2| |m@2| |n@2| |o@2| |p@2| @7| +0#0000000#ffffff0@10
|
||||
|q@2| |r@2| |s|s+0#a9abb1255#03050b255@1| |m+0#e5e9f0255&|i|d@1|l|e|u+0#a9abb1255&| |v@2| |w@2| |x@2| @7| +0#0000000#ffffff0@10
|
||||
|y@2| |z@2| |1@2| |2@2| |3@2| |4@2| |5@2| |6@2| @18
|
||||
|~+0#0000ff255&| @48
|
||||
|~| @48
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
>r+0&#ffffff0|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2||+1&&|l+0&&|e|f|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2||+1&&|l+0&&|e|f|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |o+0#ffffff255#000045255|p|a|c|i|t|y|x+0#8080c5255&|o+0#ffffff255&|v|e|r||+1#8080c5255&|v+0#ffffff255&|s|p|l|i|t|i+0#8080c5255&|n|d|o|w| |t+0#0000000#ffffff0|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |o+0#ffffff255#000045255|p|a|c|i|t|y|x+0#7f7fc5255&|o+0#ffffff255&|v|e|r||+1#7f7fc5255&|v+0#ffffff255&|s|p|l|i|t|i+0#7f7fc5255&|n|d|o|w| |t+0#0000000#ffffff0|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2||+1&&|l+0&&|e|f|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2||+1&&|l+0&&|e|f|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2||+1&&|l+0&&|e|f|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
|r+0&#ffffff0|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2||+1&&|l+0&&|e|f|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2||+1&&|l+0&&|e|f|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |o+0#ffffff255#000045255|p|a|c|i|t|y|x+0#8080c5255&|o+0#ffffff255&|v|e|r||+1#8080c5255&|v+0#ffffff255&|s|p|l|i|t|i+0#8080c5255&|n|d|o|w| |t+0#0000000#ffffff0|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |o+0#ffffff255#000045255|p|a|c|i|t|y|x+0#7f7fc5255&|o+0#ffffff255&|v|e|r||+1#7f7fc5255&|v+0#ffffff255&|s|p|l|i|t|i+0#7f7fc5255&|n|d|o|w| |t+0#0000000#ffffff0|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2||+1&&|l+0&&|e|f|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2||+1&&|l+0&&|e|f|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2
|
||||
>r|i|g|h|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2||+1&&|l+0&&|e|f|t| |w|i|n|d|o|w| |t|e|x|t| |h|e|r|e| |x@3| @2
|
||||
|
||||
+6
-6
@@ -1,9 +1,9 @@
|
||||
>い*0&#ffffff0|え*0#e08080255#600000255|ー@6| +&| +0#0000000#ffffff0|ー*&@7|い|!+&| |1| @3
|
||||
|い*&| +0#e08080255#600000255|カ*0#ffffff255&|ラ|フ|ル|な| +0#e08080255&|ー*&@1| +&| +0#0000000#ffffff0|ー*&@7|い|!+&| |2| @3
|
||||
|い*&| +0#e08080255#600000255|ポ*0#ffffff255#600030255|ッ|プ|ア|ッ|プ|で|─+0#e08080255&|╮| +0#0000000#ffffff0|ー*&@7|い|!+&| |3| @3
|
||||
|い*&| +0#e08080255#600000255|最*0#ffffff255#600030255|上|川| +0#e08080255&|ぼ*&|赤|い|な|│+&| +0#0000000#ffffff0|ー*&@7|い|!+&| |4| @3
|
||||
|い*&| +0#e08080255#600000255|│+0�|あ*&|い|う|え|お|ー*0#a04070255&@1|│+0#e08080255&| +0#0000000#ffffff0|ー*&@7|い|!+&| |5| @3
|
||||
|い*&| +&|│+0#ffffff255#000060255|ー*0#8080e0255&@6|│+0#ffffff255&| +0#0000000#ffffff0|ー*&@7|い|!+&| |6| @3
|
||||
>い*0&#ffffff0|え*0#df7f7f255#600000255|ー@6| +&| +0#0000000#ffffff0|ー*&@7|い|!+&| |1| @3
|
||||
|い*&| +0#df7f7f255#600000255|カ*0#ffffff255&|ラ|フ|ル|な| +0#df7f7f255&|ー*&@1| +&| +0#0000000#ffffff0|ー*&@7|い|!+&| |2| @3
|
||||
|い*&| +0#df7f7f255#600000255|ポ*0#ffffff255#600030255|ッ|プ|ア|ッ|プ|で|─+0#df7f7f255&|╮| +0#0000000#ffffff0|ー*&@7|い|!+&| |3| @3
|
||||
|い*&| +0#df7f7f255#600000255|最*0#ffffff255#600030255|上|川| +0#df7f7f255&|ぼ*&|赤|い|な|│+&| +0#0000000#ffffff0|ー*&@7|い|!+&| |4| @3
|
||||
|い*&| +0#df7f7f255#600000255|│+0�|あ*&|い|う|え|お|ー*0#a03f6f255&@1|│+0#df7f7f255&| +0#0000000#ffffff0|ー*&@7|い|!+&| |5| @3
|
||||
|い*&| +&|│+0#ffffff255#000060255|ー*0#7f7fdf255&@6|│+0#ffffff255&| +0#0000000#ffffff0|ー*&@7|い|!+&| |6| @3
|
||||
|い*&| +&|╰+0#ffffff255#000060255|─@13|╯| +0#0000000#ffffff0|ー*&@7|い|!+&| |7| @3
|
||||
|い*&|え|ー@15|い|!+&| |8| @3
|
||||
|い*&|え|ー@15|い|!+&| |9| @3
|
||||
|
||||
+6
-6
@@ -2,12 +2,12 @@
|
||||
|い*&|え|ー@15|い|!+&| |2| @3
|
||||
|い*&| +&|╭+0#ffffff255#000060255|─@13|╮| +0#0000000#ffffff0|ー*&@7|い|!+&| |3| @3
|
||||
|い*&| +&|│+0#ffffff255#000060255|あ*&|め|ん|ぼ|赤|い|な|│+&| +0#0000000#ffffff0|ー*&@7|い|!+&| |4| @3
|
||||
|い*&| +&|│+0#ffffff255#000060255|あ*&|い|う|え|お|ー*0#8080e0255&@1|│+0#ffffff255&| +0#0000000#ffffff0|ー*&@7|い|!+&| |5| @3
|
||||
|い*&| +&|│+0#ffffff255#000060255|ー*0#8080e0255&@4| +&| +0#a04070255#600030255|ー*&|│+0#e08080255&| +0�|ー*&@5|ー*0#0000000#ffffff0@1|い|!+&| |6| @3
|
||||
|い*&| +&|╰+0#ffffff255#000060255|─@10|─+0#e08080255#600030255|カ*0#ffffff255&|ラ*0�|フ|ル|な|ー*0#e08080255&@2|ー*0#0000000#ffffff0@1|い|!+&| |7| @3
|
||||
|い*&|え|ー@4| +&| +0#e08080255#600000255|ポ*0#ffffff255&|ッ|プ|ア|ッ|プ|で|ー*0#e08080255&|ー*0#0000000#ffffff0@1|い|!+&| |8| @3
|
||||
|い*&|え|ー@4| +&| +0#e08080255#600000255|最*0#ffffff255&|上|川|ー*0#e08080255&@4|ー*0#0000000#ffffff0@1|い|!+&| |9| @3
|
||||
|い*&|え|ー@4| +&| +0#e08080255#600000255|ー*&@7|ー*0#0000000#ffffff0@1|い|!+&| |1|0| @2
|
||||
|い*&| +&|│+0#ffffff255#000060255|あ*&|い|う|え|お|ー*0#7f7fdf255&@1|│+0#ffffff255&| +0#0000000#ffffff0|ー*&@7|い|!+&| |5| @3
|
||||
|い*&| +&|│+0#ffffff255#000060255|ー*0#7f7fdf255&@4| +&| +0#a03f6f255#600030255|ー*&|│+0#df7f7f255&| +0�|ー*&@5|ー*0#0000000#ffffff0@1|い|!+&| |6| @3
|
||||
|い*&| +&|╰+0#ffffff255#000060255|─@10|─+0#df7f7f255#600030255|カ*0#ffffff255&|ラ*0�|フ|ル|な|ー*0#df7f7f255&@2|ー*0#0000000#ffffff0@1|い|!+&| |7| @3
|
||||
|い*&|え|ー@4| +&| +0#df7f7f255#600000255|ポ*0#ffffff255&|ッ|プ|ア|ッ|プ|で|ー*0#df7f7f255&|ー*0#0000000#ffffff0@1|い|!+&| |8| @3
|
||||
|い*&|え|ー@4| +&| +0#df7f7f255#600000255|最*0#ffffff255&|上|川|ー*0#df7f7f255&@4|ー*0#0000000#ffffff0@1|い|!+&| |9| @3
|
||||
|い*&|え|ー@4| +&| +0#df7f7f255#600000255|ー*&@7|ー*0#0000000#ffffff0@1|い|!+&| |1|0| @2
|
||||
|い*&|え|ー@15|い|!+&| |1@1| @2
|
||||
|い*&|え|ー@15|い|!+&| |1|2| @2
|
||||
|い*&|え|ー@15|い|!+&| |1|3| @2
|
||||
|
||||
@@ -729,6 +729,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
520,
|
||||
/**/
|
||||
519,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user