1
0
forked from aniani/vim

patch 9.0.0392: inverted condition is a bit confusing

Problem:    Inverted condition is a bit confusing.
Solution:   Remove the "!" and swap the blocks. (Ken Takata)
This commit is contained in:
K.Takata 2022-09-05 21:45:11 +01:00 committed by Bram Moolenaar
parent 3411265a36
commit e53a0d4409
2 changed files with 10 additions and 8 deletions

View File

@ -8197,20 +8197,20 @@ get_default_console_color(
ctermbg = -1;
if (id > 0)
syn_id2cterm_bg(id, &ctermfg, &ctermbg);
if (!USE_WT)
{
guibg = ctermbg != -1 ? ctermtoxterm(ctermbg)
: default_console_color_bg;
cterm_normal_bg_gui_color = guibg;
ctermbg = ctermbg < 0 ? 0 : ctermbg;
}
else
if (USE_WT)
{
cterm_normal_bg_gui_color = guibg =
ctermbg != -1 ? ctermtoxterm(ctermbg) : INVALCOLOR;
if (ctermbg < 0)
ctermbg = 0;
}
else
{
guibg = ctermbg != -1 ? ctermtoxterm(ctermbg)
: default_console_color_bg;
cterm_normal_bg_gui_color = guibg;
ctermbg = ctermbg < 0 ? 0 : ctermbg;
}
}
*cterm_fg = ctermfg;

View File

@ -703,6 +703,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
392,
/**/
391,
/**/