From 2e1fd546012d485296fb5090dfa7d64b07de7f09 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Sun, 24 May 2015 10:52:28 +0200 Subject: [PATCH] Make :SignifyDebugDiff more robust and add it to help --- autoload/sy/debug.vim | 6 ++++-- doc/signify.txt | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/autoload/sy/debug.vim b/autoload/sy/debug.vim index 3443d8d..3227b15 100644 --- a/autoload/sy/debug.vim +++ b/autoload/sy/debug.vim @@ -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 diff --git a/doc/signify.txt b/doc/signify.txt index 0cb8196..6564d20 100644 --- a/doc/signify.txt +++ b/doc/signify.txt @@ -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*