From 90722a47034ae827c5a733e06a62d194207a492d Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Thu, 1 Nov 2018 21:12:14 +0100 Subject: [PATCH] Make an error message more clear --- autoload/vimwiki/base.vim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim index 92ba84f..0c34da0 100644 --- a/autoload/vimwiki/base.vim +++ b/autoload/vimwiki/base.vim @@ -743,7 +743,7 @@ function! vimwiki#base#edit_file(command, filename, anchor, ...) try execute a:command fname catch /E37:/ - echomsg 'Vimwiki: The current file is modified. Hint: Take a look at' + echomsg 'Vimwiki: Can''t leave the current buffer, because it is modified. Hint: Take a look at' \ ''':h g:vimwiki_autowriteall'' to see how to save automatically.' return catch /E325:/ @@ -1292,12 +1292,10 @@ function! vimwiki#base#rename_link() let new_link = input('Enter new name: ') if new_link =~# '[/\\]' - " It is actually doable but I do not have free time to do it. echomsg 'Vimwiki Error: Cannot rename to a filename with path!' return endif - " check new_fname - it should be 'good', not empty if substitute(new_link, '\s', '', 'g') == '' echomsg 'Vimwiki Error: Cannot rename to an empty filename!' return