mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Use correct line ending for realtime diff.
This commit is contained in:
@@ -219,7 +219,14 @@ function! s:run_diff(realtime)
|
||||
endif
|
||||
let cmd = s:escape(cmd)
|
||||
if a:realtime
|
||||
let buffer_contents = join(getline(1, '$'), "\n") . "\n"
|
||||
if &fileformat ==# "dos"
|
||||
let eol = "\r\n"
|
||||
elseif &fileformat ==# "mac"
|
||||
let eol = "\r"
|
||||
else
|
||||
let eol = "\n"
|
||||
endif
|
||||
let buffer_contents = join(getline(1, '$'), eol) . eol
|
||||
let diff = system(s:command_in_directory_of_file(cmd), buffer_contents)
|
||||
else
|
||||
let diff = system(s:command_in_directory_of_file(cmd))
|
||||
|
||||
Reference in New Issue
Block a user