SignifyDiff: convert encoding based on fileencoding (#278)

This commit is contained in:
itouen 2018-11-17 01:23:24 +09:00 committed by Marco Hinz
parent c4eb6e1469
commit ea87e05e6f

View File

@ -252,6 +252,7 @@ function! sy#repo#diffmode(do_tab) abort
let cmd = s:expand_cmd(vcs, g:signify_vcs_cmds_diffmode)
call sy#verbose('SignifyDiff: '. cmd, vcs)
let ft = &filetype
let fenc = &fenc
if a:do_tab
tabedit %
endif
@ -260,7 +261,11 @@ function! sy#repo#diffmode(do_tab) abort
try
execute chdir fnameescape(b:sy.info.dir)
leftabove vnew
if has('iconv')
silent put =iconv(system(cmd), fenc, &enc)
else
silent put =system(cmd)
endif
finally
execute chdir fnameescape(cwd)
endtry