commit 8f651834fdc7df8b16660d8beee6ccb90643cad4
parent dec6a9ecab3e5ec9ceff28b84cabb5c62d05ee9f
Author: R. David Dunphy <rdd.dunphy@gmail.com>
Date: Sun, 2 Apr 2023 00:57:52 +0100
Cancel goto() if input was empty
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim
@@ -495,6 +495,11 @@ function! vimwiki#base#goto(...) abort
let key = a:0 > 0 && a:1 !=# '' ? a:1 : input('Enter name: ', '',
\ 'customlist,vimwiki#base#complete_links_escaped')
+ if key ==# ''
+ " Input cancelled
+ return
+ endif
+
let anchor = a:0 > 1 ? a:2 : ''
" Save current file pos