From 02fe20ece46912dd964a185bf6896fc8759564d2 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 14 Sep 2018 18:45:22 +0200 Subject: [PATCH] Use :keeppatterns with :substitute --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index d7621a6..bacf5f3 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1493,13 +1493,13 @@ function! fugitive#BufReadCmd(...) abort if getline('.') ==# 'parent ' silent keepjumps delete_ else - silent exe 'keepjumps s/\m\C\%(^parent\)\@\)\=$','W',line('.')+3) if lnum silent keepjumps delete_ end - silent keepjumps 1,/^diff --git\|\%$/g/\r$/s/// + silent exe (exists(':keeppatterns') ? 'keeppatterns' : '') 'keepjumps 1,/^diff --git\|\%$/g/\r$/s///' keepjumps 1 endif elseif b:fugitive_type ==# 'stage'