]> granicus.if.org Git - vim/commitdiff
patch 9.0.0392: inverted condition is a bit confusing v9.0.0392
authorK.Takata <kentkt@csc.jp>
Mon, 5 Sep 2022 20:45:11 +0000 (21:45 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 5 Sep 2022 20:45:11 +0000 (21:45 +0100)
Problem:    Inverted condition is a bit confusing.
Solution:   Remove the "!" and swap the blocks. (Ken Takata)

src/os_win32.c
src/version.c

index f6bf91d9fa1a7c6733b64ee803fb986f49e3ac27..d936e4f0871fde0e0662b098d2dbd3b21abc57cb 100644 (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;
index 2edbe83bf1bbd25b11ba798a65bc82fdcd177560..87603fc4b00c01b188fd332ba772980d0c0b639f 100644 (file)
@@ -703,6 +703,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    392,
 /**/
     391,
 /**/