From d064e0639f488b975af12aad01040493e265804c Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Mon, 14 Jun 2010 01:40:57 +0200 Subject: Bug fix: Ignore missing tags file when caching tagged files --- autoload.vim | 11 ++++++++--- 1 file 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 -" 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 /\/ + " Ignore missing tags file. + call s:set_tagged_files([]) + endtry endif endfunction -- cgit v1.2.3