From 364cfcc514f1cd3386221aaa79bf9f12b85b6574 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Fri, 8 Aug 2014 23:20:28 +0200 Subject: Bug fix for issue #90 caused by pull request #84 (async refactor) See issue 90 on GitHub: https://github.com/xolox/vim-easytags/issues/90 This was caused by the async refactor: https://github.com/xolox/vim-easytags/pull/84 --- autoload/xolox/easytags.vim | 2 +- autoload/xolox/easytags/update.vim | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index 6dd44ef..5a67991 100644 --- a/autoload/xolox/easytags.vim +++ b/autoload/xolox/easytags.vim @@ -3,7 +3,7 @@ " Last Change: August 8, 2014 " URL: http://peterodding.com/code/vim/easytags/ -let g:xolox#easytags#version = '3.6.4' +let g:xolox#easytags#version = '3.6.6' let g:xolox#easytags#default_pattern_prefix = '\C\<' let g:xolox#easytags#default_pattern_suffix = '\>' diff --git a/autoload/xolox/easytags/update.vim b/autoload/xolox/easytags/update.vim index 3706169..d35a338 100644 --- a/autoload/xolox/easytags/update.vim +++ b/autoload/xolox/easytags/update.vim @@ -1,6 +1,6 @@ " Vim script " Author: Peter Odding -" Last Change: June 30, 2014 +" Last Change: August 8, 2014 " URL: http://peterodding.com/code/vim/easytags/ " This Vim auto-load script contains the parts of vim-easytags that are used @@ -151,7 +151,12 @@ function! xolox#easytags#update#read_tagsfile(tagsfile) " {{{1 let headers = [] let entries = [] let num_invalid = 0 - for line in readfile(a:tagsfile) + if filereadable(a:tagsfile) + let lines = readfile(a:tagsfile) + else + let lines = [] + endif + for line in lines if line =~# '^!_TAG_' call add(headers, line) else -- cgit v1.2.3