From 804aa3b170b5394880b4c37717d7019e3d417afd Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Sat, 7 May 2011 18:04:01 +1200 Subject: [PATCH] Small cleanup --- plugin/tagbar.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index 813e2c6..9720ea5 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -2481,12 +2481,12 @@ endfunction function! s:AutoUpdate(fname) " Don't do anything if tagbar is not open or if we're in the tagbar window let tagbarwinnr = bufwinnr('__Tagbar__') - if tagbarwinnr == -1 || &filetype == 'tagbar' || &filetype == '' + if tagbarwinnr == -1 || &filetype == 'tagbar' return endif " Only consider the main filetype in cases like 'python.django' - let ftype = split(&filetype, '\.')[0] + let ftype = get(split(&filetype, '\.'), 0, '') " Don't do anything if the file isn't supported if !s:IsValidFile(a:fname, ftype)