mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-10 20:43:47 -05:00
Use a temporary file for buffer for realtime diffs
`git diff` doesn't perform EOL conversion on stdin, causing it to mistakenly flag every line as having changed when the working tree uses a different EOL than the blobs. Writing the buffer to a temporary file and diffing against that avoids this issue. Fixes #232.
This commit is contained in:
@@ -47,6 +47,10 @@ function! gitgutter#utility#filename()
|
||||
return fnamemodify(s:file, ':t')
|
||||
endfunction
|
||||
|
||||
function! gitgutter#utility#extension()
|
||||
return fnamemodify(s:file, ':e')
|
||||
endfunction
|
||||
|
||||
function! gitgutter#utility#directory_of_file()
|
||||
return fnamemodify(s:file, ':h')
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user