SignifyDiff: cd into dir of file
All VCS assume slightly different things where things have to be if you're in this directory using that command etc. Changing to the directory of the current file avoids many pitfalls.
This commit is contained in:
parent
14413921fe
commit
d9e881bd0f
@ -260,8 +260,14 @@ function! sy#repo#diffmode() abort
|
||||
let ft = &filetype
|
||||
tabedit %
|
||||
diffthis
|
||||
let [cwd, chdir] = sy#util#chdir()
|
||||
try
|
||||
execute chdir fnameescape(b:sy_info.dir)
|
||||
leftabove vnew
|
||||
silent put =system(cmd)
|
||||
finally
|
||||
execute chdir fnameescape(cwd)
|
||||
endtry
|
||||
silent 1delete
|
||||
diffthis
|
||||
set buftype=nofile bufhidden=wipe nomodified
|
||||
|
Loading…
Reference in New Issue
Block a user