diff --git a/autoload/sy.vim b/autoload/sy.vim index d6e166f..b994aff 100644 --- a/autoload/sy.vim +++ b/autoload/sy.vim @@ -159,7 +159,13 @@ endfunction " Function: #verbose {{{1 function! sy#verbose(msg, ...) abort if &verbose - echomsg printf('[sy%s] %s', (a:0 ? ':'.a:1 : ''), a:msg) + if type(a:msg) == type([]) + for msg in a:msg + echomsg printf('[sy%s] %s', (a:0 ? ':'.a:1 : ''), msg) + endfor + else + echomsg printf('[sy%s] %s', (a:0 ? ':'.a:1 : ''), a:msg) + endif endif endfunction diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index 26896c1..67494a7 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -75,7 +75,7 @@ function! sy#repo#get_diff_start(vcs) abort let [cmd, options] = s:initialize_job(a:vcs) let [cwd, chdir] = sy#util#chdir() - call sy#verbose(printf('CMD: %s | CWD: %s', string(cmd), b:sy.info.dir), a:vcs) + call sy#verbose(['CMD: '. string(cmd), 'CMD DIR: '. b:sy.info.dir, 'ORIG DIR: '. cwd], a:vcs) try execute chdir fnameescape(b:sy.info.dir) @@ -100,7 +100,7 @@ function! sy#repo#get_diff_start(vcs) abort let [cmd, options] = s:initialize_job(a:vcs) let [cwd, chdir] = sy#util#chdir() - call sy#verbose(printf('CMD: %s | CWD: %s', string(cmd), getcwd()), a:vcs) + call sy#verbose(['CMD: '. string(cmd), 'CMD DIR: '. b:sy.info.dir, 'ORIG DIR: '. cwd], a:vcs) try execute chdir fnameescape(b:sy.info.dir)