Skip to content
This repository
Browse code

Bug fix for alias handling

  • Loading branch information...
commit 3b4db424731f952050b9e27917b842e1c2351641 1 parent f7a6793
Peter Odding authored February 24, 2011
8  autoload.vim
... ...
@@ -1,6 +1,6 @@
1 1
 " Vim script
2 2
 " Author: Peter Odding <peter@peterodding.com>
3  
-" Last Change: December 4, 2010
  3
+" Last Change: February 24, 2011
4 4
 " URL: http://peterodding.com/code/vim/easytags/
5 5
 
6 6
 let s:script = expand('<sfile>:p:~')
@@ -206,12 +206,14 @@ endfunction
206 206
 
207 207
 function! easytags#highlight() " {{{2
208 208
   try
  209
+    " Treat C++ and Objective-C as plain C.
209 210
     let filetype = get(s:canonical_aliases, &ft, &ft)
210 211
     let tagkinds = get(s:tagkinds, filetype, [])
211 212
     if exists('g:syntax_on') && !empty(tagkinds) && !exists('b:easytags_nohl')
212 213
       let starttime = xolox#timer#start()
213  
-      if !has_key(s:aliases, &ft)
214  
-        let taglist = filter(taglist('.'), "get(v:val, 'language', '') ==? &ft")
  214
+      if !has_key(s:aliases, filetype)
  215
+        let ctags_filetype = easytags#to_ctags_ft(filetype)
  216
+        let taglist = filter(taglist('.'), "get(v:val, 'language', '') ==? ctags_filetype")
215 217
       else
216 218
         let aliases = s:aliases[&ft]
217 219
         let taglist = filter(taglist('.'), "has_key(aliases, tolower(get(v:val, 'language', '')))")
4  easytags.vim
... ...
@@ -1,10 +1,10 @@
1 1
 " Vim plug-in
2 2
 " Author: Peter Odding <peter@peterodding.com>
3  
-" Last Change: December 4, 2010
  3
+" Last Change: February 24, 2011
4 4
 " URL: http://peterodding.com/code/vim/easytags/
5 5
 " Requires: Exuberant Ctags (http://ctags.sf.net)
6 6
 " License: MIT
7  
-" Version: 2.1.9
  7
+" Version: 2.1.10
8 8
 
9 9
 " Support for automatic update using the GLVS plug-in.
10 10
 " GetLatestVimScripts: 3114 1 :AutoInstall: easytags.zip

0 notes on commit 3b4db42

Please sign in to comment.
Something went wrong with that request. Please try again.