Skip to content

Commit

Permalink
Fix Visual guifg
Browse files Browse the repository at this point in the history
vim/vim#14025 changed the default from `guifg=NONE` to
`guifg=LightGrey`, so we must now explicitly `guifg=NONE` in order to
unset it, so that syntax highlighting is preserved in visual mode.
  • Loading branch information
nkouevda committed Mar 7, 2024
1 parent 2dffca5 commit f7702ab
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions colors/monokai.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ let g:terminal_ansi_colors = repeat(values(s:ansi_hex), 2)
function! s:highlight(group, fg, bg, ...)
let l:attrs = a:0 ? a:1 : 'NONE'
exe 'hi ' .. a:group .. ' cterm=' .. l:attrs .. ' gui=' .. l:attrs
if a:fg != ''
exe 'hi ' .. a:group .. ' ctermfg=' .. s:colors[a:fg][g:monokai_256_cterm]
exe 'hi ' .. a:group .. ' guifg=' .. s:colors[a:fg][2 + g:monokai_256_gui]
endif
if a:bg != ''
exe 'hi ' .. a:group .. ' ctermbg=' .. s:colors[a:bg][g:monokai_256_cterm]
exe 'hi ' .. a:group .. ' guibg=' .. s:colors[a:bg][2 + g:monokai_256_gui]
endif

let l:fg = get(s:colors, a:fg, ['NONE', 'NONE', 'NONE', 'NONE'])
exe 'hi ' .. a:group .. ' ctermfg=' .. l:fg[g:monokai_256_cterm]
exe 'hi ' .. a:group .. ' guifg=' .. l:fg[2 + g:monokai_256_gui]

let l:bg = get(s:colors, a:bg, ['NONE', 'NONE', 'NONE', 'NONE'])
exe 'hi ' .. a:group .. ' ctermbg=' .. l:bg[g:monokai_256_cterm]
exe 'hi ' .. a:group .. ' guibg=' .. l:bg[2 + g:monokai_256_gui]
endfunction

" General
Expand Down

0 comments on commit f7702ab

Please sign in to comment.