mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-07 21:24:40 +08:00
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:
@@ -77,7 +77,7 @@ function! fzf#complete(...)
|
|||||||
return call('fzf#vim#complete', a:000)
|
return call('fzf#vim#complete', a:000)
|
||||||
endfunction
|
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()
|
function! s:fzf_restore_colors()
|
||||||
if exists('#User#FzfStatusLine')
|
if exists('#User#FzfStatusLine')
|
||||||
doautocmd User FzfStatusLine
|
doautocmd User FzfStatusLine
|
||||||
@@ -95,7 +95,7 @@ if has('nvim') && get(g:, 'fzf_nvim_statusline', 1)
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:fzf_nvim_term()
|
function! s:fzf_vim_term()
|
||||||
if get(w:, 'airline_active', 0)
|
if get(w:, 'airline_active', 0)
|
||||||
let w:airline_disabled = 1
|
let w:airline_disabled = 1
|
||||||
autocmd BufWinLeave <buffer> let w:airline_disabled = 0
|
autocmd BufWinLeave <buffer> let w:airline_disabled = 0
|
||||||
@@ -108,7 +108,7 @@ if has('nvim') && get(g:, 'fzf_nvim_statusline', 1)
|
|||||||
|
|
||||||
augroup _fzf_statusline
|
augroup _fzf_statusline
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd FileType fzf call s:fzf_nvim_term()
|
autocmd FileType fzf call s:fzf_vim_term()
|
||||||
augroup END
|
augroup END
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user