SignifyDiff: convert encoding based on fileencoding (#278)
This commit is contained in:
parent
c4eb6e1469
commit
ea87e05e6f
@ -252,6 +252,7 @@ function! sy#repo#diffmode(do_tab) 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
|
||||||
|
let fenc = &fenc
|
||||||
if a:do_tab
|
if a:do_tab
|
||||||
tabedit %
|
tabedit %
|
||||||
endif
|
endif
|
||||||
@ -260,7 +261,11 @@ function! sy#repo#diffmode(do_tab) abort
|
|||||||
try
|
try
|
||||||
execute chdir fnameescape(b:sy.info.dir)
|
execute chdir fnameescape(b:sy.info.dir)
|
||||||
leftabove vnew
|
leftabove vnew
|
||||||
silent put =system(cmd)
|
if has('iconv')
|
||||||
|
silent put =iconv(system(cmd), fenc, &enc)
|
||||||
|
else
|
||||||
|
silent put =system(cmd)
|
||||||
|
endif
|
||||||
finally
|
finally
|
||||||
execute chdir fnameescape(cwd)
|
execute chdir fnameescape(cwd)
|
||||||
endtry
|
endtry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user