Vim gets stuck when converting a read-only file

because it tries to write it beforehand.
Fix #81
This commit is contained in:
EinfachToll
2014-10-23 12:18:28 +02:00
parent fb5ea2886b
commit 39b6239820
2 changed files with 6 additions and 4 deletions

View File

@ -204,7 +204,7 @@ function! s:subst_func(line, regexp, func, ...) " {{{
endfunction " }}}
function! s:save_vimwiki_buffer() "{{{
if &filetype == 'vimwiki'
if &filetype == 'vimwiki' && filewritable(expand('%'))
silent update
endif
endfunction "}}}