mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 19:43:47 -05:00
Whitespace.
This commit is contained in:
@@ -331,13 +331,16 @@ endfunction
|
|||||||
|
|
||||||
function! s:write_buffer(bufnr, file)
|
function! s:write_buffer(bufnr, file)
|
||||||
let bufcontents = getbufline(a:bufnr, 1, '$')
|
let bufcontents = getbufline(a:bufnr, 1, '$')
|
||||||
|
|
||||||
if getbufvar(a:bufnr, '&fileformat') ==# 'dos'
|
if getbufvar(a:bufnr, '&fileformat') ==# 'dos'
|
||||||
call map(bufcontents, 'v:val."\r"')
|
call map(bufcontents, 'v:val."\r"')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let fenc = getbufvar(a:bufnr, '&fileencoding')
|
let fenc = getbufvar(a:bufnr, '&fileencoding')
|
||||||
if fenc !=# &encoding
|
if fenc !=# &encoding
|
||||||
call map(bufcontents, 'iconv(v:val, &encoding, "'.fenc.'")')
|
call map(bufcontents, 'iconv(v:val, &encoding, "'.fenc.'")')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call writefile(bufcontents, a:file)
|
call writefile(bufcontents, a:file)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user