Fix for #122, don't claim ownership over directories
This commit is contained in:
parent
6607a3f641
commit
62da755350
@ -965,7 +965,10 @@ function! vimwiki#base#edit_file(command, filename, anchor, ...) "{{{
|
|||||||
" getpos() directly after this command. Strange.
|
" getpos() directly after this command. Strange.
|
||||||
if !(a:command ==# ':e ' && vimwiki#path#is_equal(a:filename, expand('%:p')))
|
if !(a:command ==# ':e ' && vimwiki#path#is_equal(a:filename, expand('%:p')))
|
||||||
execute a:command.' '.fname
|
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
|
set filetype=vimwiki
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user