Use :keeppatterns with :substitute
This commit is contained in:
parent
6cd8ff77f0
commit
02fe20ece4
@ -1493,13 +1493,13 @@ function! fugitive#BufReadCmd(...) abort
|
|||||||
if getline('.') ==# 'parent '
|
if getline('.') ==# 'parent '
|
||||||
silent keepjumps delete_
|
silent keepjumps delete_
|
||||||
else
|
else
|
||||||
silent exe 'keepjumps s/\m\C\%(^parent\)\@<! /\rparent /e' . (&gdefault ? '' : 'g')
|
silent exe (exists(':keeppatterns') ? 'keeppatterns' : '') 'keepjumps s/\m\C\%(^parent\)\@<! /\rparent /e' . (&gdefault ? '' : 'g')
|
||||||
endif
|
endif
|
||||||
keepjumps let lnum = search('^encoding \%(<unknown>\)\=$','W',line('.')+3)
|
keepjumps let lnum = search('^encoding \%(<unknown>\)\=$','W',line('.')+3)
|
||||||
if lnum
|
if lnum
|
||||||
silent keepjumps delete_
|
silent keepjumps delete_
|
||||||
end
|
end
|
||||||
silent keepjumps 1,/^diff --git\|\%$/g/\r$/s///
|
silent exe (exists(':keeppatterns') ? 'keeppatterns' : '') 'keepjumps 1,/^diff --git\|\%$/g/\r$/s///'
|
||||||
keepjumps 1
|
keepjumps 1
|
||||||
endif
|
endif
|
||||||
elseif b:fugitive_type ==# 'stage'
|
elseif b:fugitive_type ==# 'stage'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user