mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user