mirror of
https://github.com/preservim/tagbar.git
synced 2025-02-12 23:16:14 +08:00
commit
bef1fa4080
|
@ -985,12 +985,21 @@ function! s:ProcessFile(fname, ftype) abort
|
|||
let tempfile .= '.' . ext
|
||||
endif
|
||||
|
||||
call writefile(getbufline(fileinfo.bufnr, 1, '$'), tempfile)
|
||||
call tagbar#debug#log('Caching file into: ' . tempfile)
|
||||
let templines = getbufline(fileinfo.bufnr, 1, '$')
|
||||
let res = writefile(templines, tempfile)
|
||||
|
||||
if res != 0
|
||||
call tagbar#debug#log('Could not create copy '.tempfile)
|
||||
return
|
||||
endif
|
||||
let fileinfo.mtime = getftime(tempfile)
|
||||
|
||||
let ctags_output = s:ExecuteCtagsOnFile(tempfile, a:fname, typeinfo)
|
||||
|
||||
call delete(tempfile)
|
||||
if !tagbar#debug#enabled()
|
||||
call delete(tempfile)
|
||||
endif
|
||||
|
||||
if ctags_output == -1
|
||||
call tagbar#debug#log('Ctags error when processing file')
|
||||
|
@ -1088,6 +1097,11 @@ function! s:ExecuteCtagsOnFile(fname, realfname, typeinfo) abort
|
|||
\ '--append=no'
|
||||
\ ]
|
||||
|
||||
" verbose if debug enabled
|
||||
if tagbar#debug#enabled()
|
||||
let ctags_args += [ '-V' ]
|
||||
endif
|
||||
|
||||
" Include extra type definitions
|
||||
if has_key(a:typeinfo, 'deffile')
|
||||
let ctags_args += ['--options=' . expand(a:typeinfo.deffile)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user