Fix diff after :Gwrite

This works around a bug in Vim that was fixed in patch 8.0.0421.

Closes https://github.com/tpope/vim-fugitive/issues/1102

References https://github.com/tpope/vim-fugitive/pull/859
This commit is contained in:
Tim Pope 2019-08-18 07:46:26 -04:00
parent ed6f4256fc
commit ff058bf5b7

View File

@ -4139,6 +4139,7 @@ function! s:WriteCommand(line1, line2, range, count, bang, mods, reg, arg, args)
silent execute '1,'.last.'delete_' silent execute '1,'.last.'delete_'
silent write! silent write!
silent execute lnum silent execute lnum
diffupdate
let did = 1 let did = 1
finally finally
if exists('restorewinnr') if exists('restorewinnr')