mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Fix wrong signs when &encoding and &fileencoding differ
This commit is contained in:
@@ -334,6 +334,9 @@ function! s:write_buffer(bufnr, file)
|
||||
if getbufvar(a:bufnr, '&fileformat') ==# 'dos'
|
||||
call map(bufcontents, 'v:val."\r"')
|
||||
endif
|
||||
if getbufvar(a:bufnr, '&fileencoding') !=# &encoding
|
||||
call map(bufcontents, 'iconv(v:val, &encoding, getbufvar(a:bufnr, "&fileencoding"))')
|
||||
endif
|
||||
call writefile(bufcontents, a:file)
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user