aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2010-06-14 01:40:57 +0200
committerPeter Odding <peter@peterodding.com>2010-06-14 01:40:57 +0200
commitd064e0639f488b975af12aad01040493e265804c (patch)
tree19216b6d6ab2c68d0e2d87e55bae9caf763b30e0
parentad3bd15a76acaeb8bd5c92e104ab95a7b55f6fee (diff)
downloadvim-easytags-d064e0639f488b975af12aad01040493e265804c.tar.gz
Bug fix: Ignore missing tags file when caching tagged files
-rw-r--r--autoload.vim11
1 files changed, 8 insertions, 3 deletions
diff --git a/autoload.vim b/autoload.vim
index ac48f4a..b536908 100644
--- a/autoload.vim
+++ b/autoload.vim
@@ -1,6 +1,6 @@
" Vim script
" Maintainer: Peter Odding <peter@peterodding.com>
-" Last Change: June 13, 2010
+" Last Change: June 14, 2010
" URL: http://peterodding.com/code/vim/easytags
" Public interface through (automatic) commands. {{{1
@@ -246,8 +246,13 @@ endfunction
function! s:cache_tagged_files() " {{{2
if !exists('s:tagged_files')
let tagsfile = easytags#get_tagsfile()
- let [header, entries] = easytags#read_tagsfile(tagsfile)
- call s:set_tagged_files(entries)
+ try
+ let [header, entries] = easytags#read_tagsfile(tagsfile)
+ call s:set_tagged_files(entries)
+ catch /\<E484\>/
+ " Ignore missing tags file.
+ call s:set_tagged_files([])
+ endtry
endif
endfunction