From 1a7ca3872c7aeae916f0556028dae020ac94988f Mon Sep 17 00:00:00 2001 From: rvmtz <165703466+rvmtz@users.noreply.github.com> Date: Sun, 3 Nov 2024 15:05:55 -0600 Subject: [PATCH] fix: pass function name when defining mappings Ensures `g:wiki_select_method` is evaluated during mapping definition, allowing `bang_wrapper()` to receive the function name instead of a variable name. --- plugin/wiki.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/wiki.vim b/plugin/wiki.vim index 4a88db7..949ba85 100644 --- a/plugin/wiki.vim +++ b/plugin/wiki.vim @@ -154,8 +154,8 @@ call wiki#init#option('wiki_zotero_root', '~/.local/zotero') command! WikiEnable call wiki#buffer#init() command! -bang WikiIndex call s:bang_wrapper("wiki#goto_index", ) command! -bang WikiJournal call s:bang_wrapper("wiki#journal#open", ) -command! -bang WikiPages call s:bang_wrapper("g:wiki_select_method.pages", ) -command! -bang WikiTags call s:bang_wrapper("g:wiki_select_method.tags", ) +command! -bang WikiPages call s:bang_wrapper(g:wiki_select_method.pages, ) +command! -bang WikiTags call s:bang_wrapper(g:wiki_select_method.tags, ) command! -nargs=? \ -complete=customlist,wiki#complete#pages \ WikiOpen call wiki#page#open()