mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 19:40:27 +01:00
Add tagbar#IsOpen() helper routine (#728)
Closes #717 Add a `tagbar#IsOpen()` helper routine to check if the tagbar window is open or not.
This commit is contained in:
@@ -3947,5 +3947,17 @@ function! tagbar#printfileinfo() abort
|
||||
echo 'Tagbar fileinfo printed to debug logfile'
|
||||
endfunction
|
||||
|
||||
" tagbar#IsOpen() {{{2
|
||||
function! tagbar#IsOpen() abort
|
||||
let tagbarwinnr = bufwinnr('__Tagbar__')
|
||||
if tagbarwinnr != -1
|
||||
" Window open
|
||||
return 1
|
||||
else
|
||||
" Window not open
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
|
||||
Reference in New Issue
Block a user