mirror of
https://github.com/joshdick/onedark.vim.git
synced 2025-11-08 11:03:49 -05:00
@@ -70,11 +70,16 @@ if !exists("g:onedark_terminal_italics")
|
||||
let g:onedark_terminal_italics = 0
|
||||
endif
|
||||
|
||||
" This function was borrowed from FlatColor: https://github.com/MaxSt/FlatColor/
|
||||
" It was based on one found in hemisu: https://github.com/noahfrederick/vim-hemisu/
|
||||
" This function is based on one from FlatColor: https://github.com/MaxSt/FlatColor/
|
||||
" Which in turn was based on one found in hemisu: https://github.com/noahfrederick/vim-hemisu/
|
||||
function! s:h(group, style)
|
||||
if g:onedark_terminal_italics == 0 && has_key(a:style, "cterm") && a:style["cterm"] == "italic"
|
||||
unlet a:style.cterm
|
||||
if g:onedark_terminal_italics == 0
|
||||
if has_key(a:style, "cterm") && a:style["cterm"] == "italic"
|
||||
unlet a:style.cterm
|
||||
endif
|
||||
if has_key(a:style, "gui") && a:style["gui"] == "italic"
|
||||
unlet a:style.gui
|
||||
endif
|
||||
endif
|
||||
if g:onedark_termcolors == 16
|
||||
let l:ctermfg = (has_key(a:style, "fg") ? a:style.fg.cterm16 : "NONE")
|
||||
@@ -82,7 +87,7 @@ function! s:h(group, style)
|
||||
else
|
||||
let l:ctermfg = (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE")
|
||||
let l:ctermbg = (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE")
|
||||
end
|
||||
endif
|
||||
execute "highlight" a:group
|
||||
\ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE")
|
||||
\ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE")
|
||||
|
||||
Reference in New Issue
Block a user