SignifyDiff! will not open a new tab

This makes is behave like :SignifyFold.

Closes #271
This commit is contained in:
Marco Hinz 2018-11-02 21:12:02 +01:00
parent cd8a85296d
commit c4eb6e1469
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F
3 changed files with 8 additions and 4 deletions

View File

@ -240,7 +240,7 @@ function! sy#repo#debug_detection()
endfunction
" Function: #diffmode {{{1
function! sy#repo#diffmode() abort
function! sy#repo#diffmode(do_tab) abort
execute sy#util#return_if_no_changes()
let vcs = b:sy.updated_by
@ -252,7 +252,9 @@ function! sy#repo#diffmode() abort
let cmd = s:expand_cmd(vcs, g:signify_vcs_cmds_diffmode)
call sy#verbose('SignifyDiff: '. cmd, vcs)
let ft = &filetype
tabedit %
if a:do_tab
tabedit %
endif
diffthis
let [cwd, chdir] = sy#util#chdir()
try

View File

@ -448,11 +448,13 @@ NOTE: Nothing will happen, if :SignifyRefresh is used from the |cmdline-window|.
------------------------------------------------------------------------------
*signify-:SignifyDiff* >
:SignifyDiff
:SignifyDiff[!]
<
Open a new tab with two windows using |diff-mode| to show the differences
between the current file and its version that was last checked in.
With [!], no new tab will be opened.
Also see |g:signify_vcs_cmds_diffmode|.
------------------------------------------------------------------------------

View File

@ -66,7 +66,7 @@ augroup END
command! -nargs=0 -bar SignifyList call sy#debug#list_active_buffers()
command! -nargs=0 -bar SignifyDebug call sy#repo#debug_detection()
command! -nargs=0 -bar -bang SignifyFold call sy#fold#dispatch(<bang>1)
command! -nargs=0 -bar SignifyDiff call sy#repo#diffmode()
command! -nargs=0 -bar -bang SignifyDiff call sy#repo#diffmode(<bang>1)
command! -nargs=0 -bar SignifyRefresh call sy#util#refresh_windows()
command! -nargs=0 -bar SignifyEnable call sy#enable()
command! -nargs=0 -bar SignifyDisable call sy#disable()