mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
An empty, unchanged file was considered to be changed (a new line added). This patch fixes s:write_buffer to use binary mode with `writefile` to not append a newline always, and does so manually for non-empty buffers, according to &endofline, &binary and &fixendofline. This is taken out of Neomake, and tested there in https://github.com/neomake/neomake/blob/091d148b/tests/utils.vader#L713-L759.