Skip to content
This repository
Browse code

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!
  • Loading branch information...
commit a380feb053cb5b3070f5b1a0176605680ab8d573 1 parent fe3f565
Peter Odding authored September 27, 2011

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

  1. 6  autoload/xolox/easytags.vim
6  autoload/xolox/easytags.vim
... ...
@@ -1,9 +1,9 @@
1 1
 " Vim script
2 2
 " Author: Peter Odding <peter@peterodding.com>
3  
-" Last Change: September 26, 2011
  3
+" Last Change: September 27, 2011
4 4
 " URL: http://peterodding.com/code/vim/easytags/
5 5
 
6  
-let g:xolox#easytags#version = '2.6'
  6
+let g:xolox#easytags#version = '2.6.1'
7 7
 
8 8
 " Public interface through (automatic) commands. {{{1
9 9
 
@@ -518,7 +518,7 @@ function! s:cache_tagged_files(context) " {{{3
518 518
     let starttime = xolox#misc#timer#start()
519 519
     for tagsfile in tagfiles()
520 520
       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)
522 522
       else
523 523
         let fname = s:canonicalize(tagsfile, a:context)
524 524
         let ftime = getftime(fname)

0 notes on commit a380feb

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