commit bd88ea968baf4ce779d05f029acb63418a103e51
parent 76f51f1dba3ff3bc5aafcf3538567eb8a11d7f40
Author: EinfachToll <istjanichtzufassen@googlemail.com>
Date: Tue, 16 Oct 2018 22:25:33 +0200
Better error handling when opening a file of which a swapfile exists
Ref #569
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim
@@ -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