Skip to content

Commit

Permalink
Minor bug fix for xolox#easytags#get_tagsfile()
Browse files Browse the repository at this point in the history
The plug-in now checks if dynamic tags files are writable.
  • Loading branch information
xolox committed Jun 13, 2011
1 parent 1de4f3d commit dc167e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions autoload/xolox/easytags.vim
Expand Up @@ -349,13 +349,13 @@ function! xolox#easytags#add_tagged_file(filename) " {{{2
endfunction

function! xolox#easytags#get_tagsfile() " {{{2
let tagsfile = expand(g:easytags_file)
if g:easytags_dynamic_files
let files = tagfiles()
if len(files) > 0
return files[0]
let tagsfile = files[0]
endif
endif
let tagsfile = expand(g:easytags_file)
if filereadable(tagsfile) && filewritable(tagsfile) != 1
let message = "The tags file %s isn't writable!"
throw printf(message, fnamemodify(tagsfile, ':~'))
Expand Down
4 changes: 2 additions & 2 deletions plugin/easytags.vim
Expand Up @@ -4,7 +4,7 @@
" URL: http://peterodding.com/code/vim/easytags/
" Requires: Exuberant Ctags (http://ctags.sf.net)
" License: MIT
" Version: 2.2.12
" Version: 2.2.13

" Support for automatic update using the GLVS plug-in.
" GetLatestVimScripts: 3114 1 :AutoInstall: easytags.zip
Expand Down Expand Up @@ -76,7 +76,7 @@ endfunction
function! s:CheckCtags(name, version)
" Not every executable out there named `ctags' is in fact Exuberant Ctags.
" This function makes sure it is because the easytags plug-in requires the
" --list-languages option.
" --list-languages option (and more).
if executable(a:name)
let command = a:name . ' --version'
try
Expand Down

0 comments on commit dc167e4

Please sign in to comment.