mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-13 22:03:51 -05:00
Enable diffing against the working tree.
Previously gitgutter could only diff the buffer against the index. This change enables diffing against the working tree, which will be useful for stashing.
This commit is contained in:
@@ -151,7 +151,7 @@ function! s:hunk_op(op)
|
||||
if gitgutter#utility#is_active(bufnr)
|
||||
" Get a (synchronous) diff.
|
||||
let [async, g:gitgutter_async] = [g:gitgutter_async, 0]
|
||||
let diff = gitgutter#diff#run_diff(bufnr, 1)
|
||||
let diff = gitgutter#diff#run_diff(bufnr, 'index', 1)
|
||||
let g:gitgutter_async = async
|
||||
|
||||
call gitgutter#hunk#set_hunks(bufnr, gitgutter#diff#parse_diff(diff))
|
||||
|
||||
Reference in New Issue
Block a user