1
0
mirror of https://github.com/amix/vimrc synced 2025-07-01 12:45:00 +08:00

Updated plugins

This commit is contained in:
amix
2016-05-14 12:57:54 +01:00
parent 5f6aa8fe09
commit f343b66088
105 changed files with 2100 additions and 4902 deletions

View File

@ -37,6 +37,14 @@ function! s:on_window_changed()
if pumvisible() && (!&previewwindow || g:airline_exclude_preview)
return
endif
" Handle each window only once, since we might come here several times for
" different autocommands.
let l:key = [bufnr('%'), winnr(), winnr('$')]
if get(t:, 'airline_last_window_changed', []) == l:key
\ && &stl is# '%!airline#statusline('.winnr().')'
return
endif
let t:airline_last_window_changed = l:key
call s:init()
call airline#update_statusline()
endfunction
@ -52,7 +60,7 @@ function! s:on_colorscheme_changed()
call airline#load_theme()
endfunction
function airline#cmdwinenter(...)
function! airline#cmdwinenter(...)
call airline#extensions#apply_left_override('Command Line', '')
endfunction
@ -79,10 +87,11 @@ function! s:airline_toggle()
autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter')
autocmd GUIEnter,ColorScheme * call <sid>on_colorscheme_changed()
autocmd VimEnter,WinEnter,BufWinEnter,FileType,BufUnload,VimResized *
autocmd SessionLoadPost,VimEnter,WinEnter,BufWinEnter,FileType,BufUnload *
\ call <sid>on_window_changed()
autocmd TabEnter * :unlet! w:airline_lastmode
autocmd VimResized * call <sid>airline_refresh()
autocmd TabEnter * :unlet! w:airline_lastmode w:airline_active
autocmd BufWritePost */autoload/airline/themes/*.vim
\ exec 'source '.split(globpath(&rtp, 'autoload/airline/themes/'.g:airline_theme.'.vim', 1), "\n")[0]
\ | call airline#load_theme()
@ -110,7 +119,11 @@ function! s:airline_theme(...)
endfunction
function! s:airline_refresh()
silent doautocmd User AirlineBeforeRefresh
let nomodeline=''
if v:version > 703 || v:version == 703 && has("patch438")
let nomodeline = '<nomodeline>'
endif
exe printf("silent doautocmd %s User AirlineBeforeRefresh", nomodeline)
call airline#load_theme()
call airline#update_statusline()
endfunction