vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit f8235890768ca730a7ff3dda026575adf7162524
parent d20e03d660809743f2b4c568c28dcc9c456dd2b6
Author: EinfachToll <istjanichtzufassen@googlemail.com>
Date:   Thu, 19 Mar 2015 13:22:28 +0100

make VimwikiCheckLinks also find nonexisting directories

Fix #120

Diffstat:
Mautoload/vimwiki/base.vim | 15+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim @@ -880,11 +880,18 @@ function! vimwiki#base#check_links() "{{{ \'text': "there is no such anchor: ".target_anchor}) endif else - if filereadable(target_file) " maybe it's a non-wiki file - let anchors_of_files[target_file] = [] + if target_file =~ '/$' " maybe it's a link to a directory + if !isdirectory(target_file) + call add(errors, {'filename':wikifile, 'lnum':lnum, 'col':col, + \'text': "there is no such directory: ".target_file}) + endif else - call add(errors, {'filename':wikifile, 'lnum':lnum, 'col':col, - \'text': "there is no such file: ".target_file}) + if filereadable(target_file) " maybe it's a non-wiki file + let anchors_of_files[target_file] = [] + else + call add(errors, {'filename':wikifile, 'lnum':lnum, 'col':col, + \'text': "there is no such file: ".target_file}) + endif endif endif endfor