SignifyDiff! will not open a new tab
This makes is behave like :SignifyFold. Closes #271
This commit is contained in:
parent
cd8a85296d
commit
c4eb6e1469
@ -240,7 +240,7 @@ function! sy#repo#debug_detection()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Function: #diffmode {{{1
|
" Function: #diffmode {{{1
|
||||||
function! sy#repo#diffmode() abort
|
function! sy#repo#diffmode(do_tab) abort
|
||||||
execute sy#util#return_if_no_changes()
|
execute sy#util#return_if_no_changes()
|
||||||
|
|
||||||
let vcs = b:sy.updated_by
|
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)
|
let cmd = s:expand_cmd(vcs, g:signify_vcs_cmds_diffmode)
|
||||||
call sy#verbose('SignifyDiff: '. cmd, vcs)
|
call sy#verbose('SignifyDiff: '. cmd, vcs)
|
||||||
let ft = &filetype
|
let ft = &filetype
|
||||||
|
if a:do_tab
|
||||||
tabedit %
|
tabedit %
|
||||||
|
endif
|
||||||
diffthis
|
diffthis
|
||||||
let [cwd, chdir] = sy#util#chdir()
|
let [cwd, chdir] = sy#util#chdir()
|
||||||
try
|
try
|
||||||
|
@ -448,11 +448,13 @@ NOTE: Nothing will happen, if :SignifyRefresh is used from the |cmdline-window|.
|
|||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*signify-:SignifyDiff* >
|
*signify-:SignifyDiff* >
|
||||||
:SignifyDiff
|
:SignifyDiff[!]
|
||||||
<
|
<
|
||||||
Open a new tab with two windows using |diff-mode| to show the differences
|
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.
|
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|.
|
Also see |g:signify_vcs_cmds_diffmode|.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
@ -66,7 +66,7 @@ augroup END
|
|||||||
command! -nargs=0 -bar SignifyList call sy#debug#list_active_buffers()
|
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 SignifyDebug call sy#repo#debug_detection()
|
||||||
command! -nargs=0 -bar -bang SignifyFold call sy#fold#dispatch(<bang>1)
|
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 SignifyRefresh call sy#util#refresh_windows()
|
||||||
command! -nargs=0 -bar SignifyEnable call sy#enable()
|
command! -nargs=0 -bar SignifyEnable call sy#enable()
|
||||||
command! -nargs=0 -bar SignifyDisable call sy#disable()
|
command! -nargs=0 -bar SignifyDisable call sy#disable()
|
||||||
|
Loading…
Reference in New Issue
Block a user