Skip to content

Commit a380feb

Browse files
committed
Bug fix for error handling in cache_tagged_files()
I was editing a file over SCP and after fixing the bug I found out something really peculiar (at least to me). When the 'tags' option instructs Vim to search upwards recursively and you're editing a remote file, Vim's tagfiles() function will pretend as if every possible file exists: :echo tagfiles() ['sftp://vps//home/peter/bin/.tags', 'sftp://vps//home/peter/.tags', 'sftp://vps//home/.tags', 'sftp://vps//.tags', 'sftp://.tags', '/home/peter/.vim/tags/filetypes/sh'] And of course the plug-in doesn't like this: easytags.vim 2.6.1: Skipping unreadable tags file sftp://vps//home/peter/bin/.tags! easytags.vim 2.6.1: Skipping unreadable tags file sftp://vps//home/peter/.tags! easytags.vim 2.6.1: Skipping unreadable tags file sftp://vps//home/.tags! easytags.vim 2.6.1: Skipping unreadable tags file sftp://vps//.tags! easytags.vim 2.6.1: Skipping unreadable tags file sftp://.tags!
1 parent fe3f565 commit a380feb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autoload/xolox/easytags.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
" Vim script
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: September 26, 2011
3+
" Last Change: September 27, 2011
44
" URL: http://peterodding.com/code/vim/easytags/
55

6-
let g:xolox#easytags#version = '2.6'
6+
let g:xolox#easytags#version = '2.6.1'
77

88
" Public interface through (automatic) commands. {{{1
99

@@ -518,7 +518,7 @@ function! s:cache_tagged_files(context) " {{{3
518518
let starttime = xolox#misc#timer#start()
519519
for tagsfile in tagfiles()
520520
if !filereadable(tagsfile)
521-
call xolox#misc#msg#warn("easytags.vim %s: Skipping unreadable tags file %s!", fname)
521+
call xolox#misc#msg#warn("easytags.vim %s: Skipping unreadable tags file %s!", g:xolox#easytags#version, tagsfile)
522522
else
523523
let fname = s:canonicalize(tagsfile, a:context)
524524
let ftime = getftime(fname)

0 commit comments

Comments
 (0)