commit 62da755350c57b425b67ca8ec9ccb22e61fbff61
parent 6607a3f641dae9c95d4e0f40d7a228d2c0c9de89
Author: EinfachToll <istjanichtzufassen@googlemail.com>
Date: Thu, 9 Apr 2015 14:29:50 +0200
Fix for #122, don't claim ownership over directories
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim
@@ -965,7 +965,10 @@ function! vimwiki#base#edit_file(command, filename, anchor, ...) "{{{
" getpos() directly after this command. Strange.
if !(a:command ==# ':e ' && vimwiki#path#is_equal(a:filename, expand('%:p')))
execute a:command.' '.fname
- if &filetype != 'vimwiki'
+ " Make sure no other plugin takes ownership over the new file. Vimwiki
+ " rules them all! Well, except for directories, which may be opened with
+ " Netrw
+ if &filetype != 'vimwiki' && fname !~ '\m/$'
set filetype=vimwiki
endif
endif