From bd88ea968baf4ce779d05f029acb63418a103e51 Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Tue, 16 Oct 2018 22:25:33 +0200 Subject: [PATCH] Better error handling when opening a file of which a swapfile exists Ref #569 --- autoload/vimwiki/base.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim index 12b5ea8..cf93366 100644 --- 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