Mercurial > vim
changeset 30112:7ad136fb7fcd v9.0.0392
patch 9.0.0392: inverted condition is a bit confusing
Commit: https://github.com/vim/vim/commit/e53a0d44090753d6284b34cc7fb5cf6c765d562c
Author: K.Takata <kentkt@csc.jp>
Date: Mon Sep 5 21:45:11 2022 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 05 Sep 2022 23:00:03 +0200 |
parents | db466dbab7f9 |
children | df06fe75a4a7 |
files | src/os_win32.c src/version.c |
diffstat | 2 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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) + 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; } - else - { - cterm_normal_bg_gui_color = guibg = - ctermbg != -1 ? ctermtoxterm(ctermbg) : INVALCOLOR; - if (ctermbg < 0) - ctermbg = 0; - } } *cterm_fg = ctermfg;