Fix for #122, don't claim ownership over directories

This commit is contained in:
EinfachToll 2015-04-09 14:29:50 +02:00
parent 6607a3f641
commit 62da755350

View File

@ -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