Better error handling when opening a file of which a swapfile exists

Ref #569
This commit is contained in:
EinfachToll 2018-10-16 22:25:33 +02:00
parent 76f51f1dba
commit bd88ea968b

View File

@ -736,6 +736,9 @@ function! vimwiki#base#edit_file(command, filename, anchor, ...)
echomsg 'Vimwiki: The current file is modified. Hint: Take a look at'
\ ''':h g:vimwiki_autowriteall'' to see how to save automatically.'
return
catch /E325:/
echom 'Vimwiki: Vim couldn''t open the file, probably because a swapfile already exists. See :h E325.'
return
endtry
endif