Decorate Vim 8 statusline

We used to decorate statusline only on Neovim, but we can do the same
for Vim 8.
This commit is contained in:
Junegunn Choi 2017-12-06 12:29:44 +09:00
parent 76926aa247
commit 11b7fb91e1
No known key found for this signature in database
GPG key ID: 254BC280FEF9C627

View file

@ -77,7 +77,7 @@ function! fzf#complete(...)
return call('fzf#vim#complete', a:000)
endfunction
if has('nvim') && get(g:, 'fzf_nvim_statusline', 1)
if (has('nvim') || has('terminal') && has('patch-8.0.995')) && (get(g:, 'fzf_statusline', 1) || get(g:, 'fzf_nvim_statusline', 1))
function! s:fzf_restore_colors()
if exists('#User#FzfStatusLine')
doautocmd User FzfStatusLine
@ -95,7 +95,7 @@ if has('nvim') && get(g:, 'fzf_nvim_statusline', 1)
endif
endfunction
function! s:fzf_nvim_term()
function! s:fzf_vim_term()
if get(w:, 'airline_active', 0)
let w:airline_disabled = 1
autocmd BufWinLeave <buffer> let w:airline_disabled = 0
@ -108,7 +108,7 @@ if has('nvim') && get(g:, 'fzf_nvim_statusline', 1)
augroup _fzf_statusline
autocmd!
autocmd FileType fzf call s:fzf_nvim_term()
autocmd FileType fzf call s:fzf_vim_term()
augroup END
endif