Merge pull request #1093 from wesQ3/windowswap-update

windowswap: use new tab-aware API if WS is up to date
This commit is contained in:
Christian Brabandt 2016-03-23 15:08:32 +01:00
commit 5ee24f5d87
1 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,11 @@ function! airline#extensions#windowswap#init(ext)
endfunction
function! airline#extensions#windowswap#get_status()
if WindowSwap#HasMarkedWindow() && WindowSwap#GetMarkedWindowNum() == winnr()
" use new tab-aware api if WS is up to date
let s:mark = exists('*WindowSwap#IsCurrentWindowMarked') ?
\WindowSwap#IsCurrentWindowMarked() :
\(WindowSwap#HasMarkedWindow() && WindowSwap#GetMarkedWindowNum() == winnr())
if s:mark
return g:airline#extensions#windowswap#indicator_text.s:spc
endif
return ''