On Thu, May 4, 2023 at 12:14 PM Enan Ajmain <[email protected]> wrote:
>
> Hi,
>
> For the value 7, ctermfg and ctermbg gives different colors. 'ctermfg=7'
> gives non-bold white, which is expected.  But 'ctermbg=7' gives bold
> Black color.  I'm assuming there is a if-conditional somewhere that's
> causing this distinction.  If so, where is the conditional in the source
> code?  If not, why is this happening?
>
> P.S.  I'm on Windows.  I have a Linux laptop but haven't checked if this
> behavior is reproducible on that OS.
>
> --
> Enan

Try to explicitly remove bold, as follows:
:hi User1 cterm=NONE ctermbg=red ctermfg=7 gui=NONE guibg=#FF0000 guifg=#777777
:hi User2 cterm=NONE ctermbg=7 ctermfg=red gui=NONE guibg=#777777 guifg=#FF0000
(Of course in order to see something we cannot set both ctermbg=7 and
ctermfg=7 on the same highlight group).
IIUC a Vim instance compiled with no GUI should ignore the gui= guibg=
guifg= settings but I don't like to define a highlight group with one
of cterm and gui colors and not the other.
You may replace User1 and User2 by whatever suits you, but if the
groups you set are already defined you may need (I'm not sure) to
clear them first with ":hi clear <name>"; then set the highlight for
two regions with text to the two highlight groups so defined.
Does the problem disappear this way, with cterm=NONE prefixed to the
ctermbg and ctermfg settings?

Best regards,
Tony.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAJkCKXvhHbcoZK-%3Dw_AMBAUNyeq3g-wJDLYk4K3F3jnQKy0oBQ%40mail.gmail.com.

Raspunde prin e-mail lui