Skip to content
This repository
Browse code

Bug fix: Ignore missing tags file when caching tagged files

  • Loading branch information...
commit d064e0639f488b975af12aad01040493e265804c 1 parent ad3bd15
Peter Odding authored June 14, 2010

Showing 1 changed file with 8 additions and 3 deletions. Show diff stats Hide diff stats

  1. 11  autoload.vim
11  autoload.vim
... ...
@@ -1,6 +1,6 @@
1 1
 " Vim script
2 2
 " Maintainer: Peter Odding <peter@peterodding.com>
3  
-" Last Change: June 13, 2010
  3
+" Last Change: June 14, 2010
4 4
 " URL: http://peterodding.com/code/vim/easytags
5 5
 
6 6
 " Public interface through (automatic) commands. {{{1
@@ -246,8 +246,13 @@ endfunction
246 246
 function! s:cache_tagged_files() " {{{2
247 247
   if !exists('s:tagged_files')
248 248
     let tagsfile = easytags#get_tagsfile()
249  
-    let [header, entries] = easytags#read_tagsfile(tagsfile)
250  
-    call s:set_tagged_files(entries)
  249
+    try
  250
+      let [header, entries] = easytags#read_tagsfile(tagsfile)
  251
+      call s:set_tagged_files(entries)
  252
+    catch /\<E484\>/
  253
+      " Ignore missing tags file.
  254
+      call s:set_tagged_files([])
  255
+    endtry
251 256
   endif
252 257
 endfunction
253 258
 

0 notes on commit d064e06

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