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:
commit
5ee24f5d87
|
@ -15,7 +15,11 @@ function! airline#extensions#windowswap#init(ext)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#windowswap#get_status()
|
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
|
return g:airline#extensions#windowswap#indicator_text.s:spc
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
|
|
Loading…
Reference in New Issue