mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-27 07:54:44 +02:00
parent
30725e6eb2
commit
e395afed51
@ -232,6 +232,7 @@ function! airline#extensions#load()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if get(g:, 'airline#extensions#vista#enabled', 1)
|
if get(g:, 'airline#extensions#vista#enabled', 1)
|
||||||
|
\ && exists(':Vista')
|
||||||
call airline#extensions#vista#init(s:ext)
|
call airline#extensions#vista#init(s:ext)
|
||||||
call add(s:loaded_ext, 'vista')
|
call add(s:loaded_ext, 'vista')
|
||||||
endif
|
endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
" MIT License. Copyright (c) 2019 s1341 (github@shmarya.net)
|
" MIT License. Copyright (c) 2019 s1341 (github@shmarya.net)
|
||||||
" Plugin: https://github.com/liuchngxu/vista.vim
|
" Plugin: https://github.com/liuchengxu/vista.vim
|
||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
@ -44,6 +44,14 @@ function! s:init()
|
|||||||
call airline#util#doautocmd('AirlineAfterInit')
|
call airline#util#doautocmd('AirlineAfterInit')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:do_vim_enter()
|
||||||
|
" Needed for the Vista extension #2009
|
||||||
|
if get(g:, 'airline#extensions#vista#enabled', 1) && exists(':Vista')
|
||||||
|
call vista#RunForNearestMethodOrFunction()
|
||||||
|
endif
|
||||||
|
call <sid>on_window_changed('VimEnter')
|
||||||
|
endfunction
|
||||||
|
|
||||||
let s:active_winnr = -1
|
let s:active_winnr = -1
|
||||||
function! s:on_window_changed(event)
|
function! s:on_window_changed(event)
|
||||||
" don't trigger for Vim popup windows
|
" don't trigger for Vim popup windows
|
||||||
@ -132,7 +140,7 @@ function! s:airline_toggle()
|
|||||||
" Refresh airline for :syntax off
|
" Refresh airline for :syntax off
|
||||||
autocmd SourcePre */syntax/syntax.vim
|
autocmd SourcePre */syntax/syntax.vim
|
||||||
\ call airline#extensions#tabline#buffers#invalidate()
|
\ call airline#extensions#tabline#buffers#invalidate()
|
||||||
autocmd VimEnter * call <sid>on_window_changed('VimEnter')
|
autocmd VimEnter * call <sid>do_vim_enter()
|
||||||
autocmd WinEnter * call <sid>on_window_changed('WinEnter')
|
autocmd WinEnter * call <sid>on_window_changed('WinEnter')
|
||||||
autocmd FileType * call <sid>on_window_changed('FileType')
|
autocmd FileType * call <sid>on_window_changed('FileType')
|
||||||
autocmd BufWinEnter * call <sid>on_window_changed('BufWinEnter')
|
autocmd BufWinEnter * call <sid>on_window_changed('BufWinEnter')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user