From ed6d002de483560bf0780b6b6f77c65ce3481208 Mon Sep 17 00:00:00 2001 From: Simon Watts Date: Thu, 26 Apr 2018 20:36:12 +0100 Subject: [PATCH] Move background transparency logic to function. --- colors/dracula.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/colors/dracula.vim b/colors/dracula.vim index e1d3759..e169d62 100644 --- a/colors/dracula.vim +++ b/colors/dracula.vim @@ -156,6 +156,14 @@ function! s:h(scope, fg, ...) " bg, attr_list, special execute join(l:hl_string, ' ') endfunction +function! s:Background() + if g:dracula_colorterm || has("gui_running") + return s:bg + else + return s:none + endif +endfunction + "}}}2 " Dracula Highlight Groups: {{{2 @@ -225,7 +233,7 @@ call s:h('DraculaDiffDelete', s:red, s:bgdark) " Core: {{{2 set background=dark -call s:h('Normal', s:fg, ( (g:dracula_colorterm == 1) || has("gui_running") ) ? s:bg : s:none) +call s:h('Normal', s:fg, s:Background()) hi! link Visual DraculaSelection hi! link VisualNOS Visual