Fix VimwikiShowVersion function. Closes #654.

Change a:xxx variable to l:xxx since argument variables are immutable as
of Vim patch 888. Convert the stable version number to a string prior to
printing.
This commit is contained in:
Rane Brown 2019-04-03 08:39:21 -06:00 committed by Michael F. Schönitzer
parent 62d71b832a
commit d3aade7349

View File

@ -195,15 +195,15 @@ endfunction
function! s:get_version() function! s:get_version()
if s:plugin_vers != -1 if s:plugin_vers != -1
echo "Stable version: " . s:plugin_vers echo "Stable version: " . string(s:plugin_vers)
else else
let a:plugin_rev = system("git --git-dir " . s:plugin_dir . "/.git rev-parse --short HEAD") let l:plugin_rev = system("git --git-dir " . s:plugin_dir . "/.git rev-parse --short HEAD")
let a:plugin_branch = system("git --git-dir " . s:plugin_dir . "/.git rev-parse --abbrev-ref HEAD") let l:plugin_branch = system("git --git-dir " . s:plugin_dir . "/.git rev-parse --abbrev-ref HEAD")
let a:plugin_date = system("git --git-dir " . s:plugin_dir . "/.git show -s --format=%ci") let l:plugin_date = system("git --git-dir " . s:plugin_dir . "/.git show -s --format=%ci")
if v:shell_error == 0 if v:shell_error == 0
echo "Branch: " . a:plugin_branch echo "Branch: " . l:plugin_branch
echo "Revision: " . a:plugin_rev echo "Revision: " . l:plugin_rev
echo "Date: " . a:plugin_date echo "Date: " . l:plugin_date
else else
echo "Unknown version" echo "Unknown version"
endif endif