From bff765b957b44988975565272eb4f6359543b4ec Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Wed, 1 Aug 2012 21:08:49 +1200 Subject: [PATCH] Only determine extension once --- autoload/tagbar.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 731f54d..b9948c9 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -1816,8 +1816,9 @@ function! s:ProcessFile(fname, ftype) abort endif let tempfile = tempname() - if fnamemodify(fileinfo.fpath, ':e') != '' - let tempfile .= '.' . fnamemodify(fileinfo.fpath, ':e') + let ext = fnamemodify(fileinfo.fpath, ':e') + if ext != '' + let tempfile .= '.' . ext endif call writefile(getbufline(fileinfo.bufnr, 1, '$'), tempfile)