From e330fb31f15dc0d58f95bc2aac8a371a222e688c Mon Sep 17 00:00:00 2001 From: Reed Esau Date: Wed, 1 Jan 2014 13:42:42 -0700 Subject: [PATCH] misc refactoring --- autoload/thematic.vim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/autoload/thematic.vim b/autoload/thematic.vim index 5e2b8bc..90b51e5 100644 --- a/autoload/thematic.vim +++ b/autoload/thematic.vim @@ -138,10 +138,12 @@ function! thematic#init(mode) endif " ------ Fix/mute colors ------ + + let l:gui_running = has('gui_running') if thematic#getThemeValue(l:th, 'sign-column-color-fix', 0) " Ensure the gutter matches the text background - if has('gui_running') + if l:gui_running hi! SignColumn guifg=fg guibg=bg else hi! SignColumn ctermfg=fg ctermbg=bg @@ -150,7 +152,7 @@ function! thematic#init(mode) if thematic#getThemeValue(l:th, 'diff-color-fix', 0) " Override diff colors - if has('gui_running') + if l:gui_running hi! DiffAdd guifg=darkgreen guibg=bg hi! DiffDelete guifg=darkorange guibg=bg hi! DiffChange guifg=darkyellow guibg=bg @@ -165,7 +167,7 @@ function! thematic#init(mode) if thematic#getThemeValue(l:th, 'fold-column-color-mute', 0) " Ensure the fold column is blank, for non-distracted editing - if has('gui_running') + if l:gui_running hi! FoldColumn guifg=bg guibg=bg else hi! FoldColumn cterm=bold ctermbg=bg ctermfg=bg @@ -212,7 +214,7 @@ function! thematic#init(mode) " ------ Set GUI-only settings ------ - if has('gui_running') + if l:gui_running call thematic#gui#init(l:th) endif