1
0
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:
raven42
2021-01-06 06:23:55 -06:00
committed by GitHub
parent eaadf90b61
commit 5f912e6ad0
2 changed files with 17 additions and 1 deletions

View File

@@ -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