mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Add 'always' parameter to autoopen()
This commit is contained in:
@@ -3081,11 +3081,13 @@ endfunction
|
||||
|
||||
" Automatically open Tagbar if one of the open buffers contains a supported
|
||||
" file
|
||||
function! tagbar#autoopen()
|
||||
function! tagbar#autoopen(...)
|
||||
let always = a:0 > 0 ? a:1 : 1
|
||||
|
||||
call s:Init()
|
||||
|
||||
for bufnr in range(1, bufnr('$'))
|
||||
if buflisted(bufnr)
|
||||
if buflisted(bufnr) && (always || bufwinnr(bufnr) != -1)
|
||||
let ftype = s:DetectFiletype(bufnr)
|
||||
if s:IsValidFile(bufname(bufnr), ftype)
|
||||
call s:OpenWindow('')
|
||||
|
||||
Reference in New Issue
Block a user