From e53a0d44090753d6284b34cc7fb5cf6c765d562c Mon Sep 17 00:00:00 2001 From: "K.Takata" Date: Mon, 5 Sep 2022 21:45:11 +0100 Subject: [PATCH] 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) --- src/os_win32.c | 16 ++++++++-------- src/version.c | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/os_win32.c b/src/os_win32.c index f6bf91d9f..d936e4f08 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -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; diff --git a/src/version.c b/src/version.c index 2edbe83bf..87603fc4b 100644 --- a/src/version.c +++ b/src/version.c @@ -703,6 +703,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 392, /**/ 391, /**/ -- 2.40.0