Toggle lightline as well

This commit is contained in:
Junegunn Choi
2014-01-02 01:10:20 +09:00
parent adb6fff7d0
commit e4631ee2df
2 changed files with 13 additions and 1 deletions

View File

@@ -158,6 +158,12 @@ function! s:goyo_on(width)
augroup! PowerlineMain
endif
" lightline.vim
let t:goyo_disabled_lightline = exists('#LightLine')
if t:goyo_disabled_lightline
silent! call lightline#disable()
endif
if !get(g:, 'goyo_linenr', 0)
setlocal nonu
if exists('&rnu')
@@ -235,6 +241,7 @@ function! s:goyo_off()
let goyo_disabled_gitgutter = t:goyo_disabled_gitgutter
let goyo_disabled_airline = t:goyo_disabled_airline
let goyo_disabled_powerline = t:goyo_disabled_powerline
let goyo_disabled_lightline = t:goyo_disabled_lightline
if tabpagenr() == 1
tabnew
@@ -268,6 +275,10 @@ function! s:goyo_off()
silent! PowerlineReloadColorscheme
endif
if goyo_disabled_lightline
silent! call lightline#enable()
endif
if exists('#Powerline')
doautocmd Powerline ColorScheme
endif