Make :SignifyDebugDiff more robust and add it to help

This commit is contained in:
Marco Hinz 2015-05-24 10:52:28 +02:00
parent 3f1f9c17fd
commit 2e1fd54601
2 changed files with 11 additions and 2 deletions

View File

@ -49,11 +49,11 @@ endfunction
" Function #verbose_diff_cmd {{{1
function! sy#debug#verbose_diff_cmd() abort
if exists('b:sy_info')
if exists('b:sy') && b:sy.type != 'unknown'
let output = sy#repo#get_diff_{b:sy.type}()[1]
echohl Statement
echo 'Command: '. b:sy_info.cmd
echohl NONE
let output = sy#repo#get_diff_{b:sy.type}()[1]
if empty(output)
echo 'Output: []'
else
@ -70,5 +70,7 @@ function! sy#debug#verbose_diff_cmd() abort
echohl NONE
endfor
endif
else
echo 'signify: I cannot detect any changes!'
endif
endfunction

View File

@ -308,6 +308,13 @@ Refresh signs in all windows.
<
Outputs debug info for all managed buffers.
------------------------------------------------------------------------------
*signify-:SignifyDebugDiff*
>
:SignifyDebugDiff
<
Print the diff command for the current buffer and its output.
==============================================================================
MAPPINGS *signify-mappings*