aboutsummaryrefslogtreecommitdiffstats
path: root/autoload.vim
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2011-02-24 20:10:01 +0100
committerPeter Odding <peter@peterodding.com>2011-02-24 20:10:01 +0100
commit3b4db424731f952050b9e27917b842e1c2351641 (patch)
tree29471694e1ad387b785eb5a99c8a839e7333752b /autoload.vim
parentf7a679316279c8f816be5f503ce4754e8c09186d (diff)
downloadvim-easytags-3b4db424731f952050b9e27917b842e1c2351641.tar.gz
Bug fix for alias handling
Diffstat (limited to 'autoload.vim')
-rw-r--r--autoload.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/autoload.vim b/autoload.vim
index 35b969f..91b3a71 100644
--- a/autoload.vim
+++ b/autoload.vim
@@ -1,6 +1,6 @@
" Vim script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: December 4, 2010
+" Last Change: February 24, 2011
" URL: http://peterodding.com/code/vim/easytags/
let s:script = expand('<sfile>:p:~')
@@ -206,12 +206,14 @@ endfunction
function! easytags#highlight() " {{{2
try
+ " Treat C++ and Objective-C as plain C.
let filetype = get(s:canonical_aliases, &ft, &ft)
let tagkinds = get(s:tagkinds, filetype, [])
if exists('g:syntax_on') && !empty(tagkinds) && !exists('b:easytags_nohl')
let starttime = xolox#timer#start()
- if !has_key(s:aliases, &ft)
- let taglist = filter(taglist('.'), "get(v:val, 'language', '') ==? &ft")
+ if !has_key(s:aliases, filetype)
+ let ctags_filetype = easytags#to_ctags_ft(filetype)
+ let taglist = filter(taglist('.'), "get(v:val, 'language', '') ==? ctags_filetype")
else
let aliases = s:aliases[&ft]
let taglist = filter(taglist('.'), "has_key(aliases, tolower(get(v:val, 'language', '')))")