vim-patch:8.2.5164: invalid memory access after diff buffer manipulations

Problem:    Invalid memory access after diff buffer manipulations.
Solution:   Use zero offset when change removes all lines in a diff block.
c101abff4c
This commit is contained in:
zeertzjq
2022-07-25 20:09:23 +08:00
parent 8543de3a86
commit 771564b00e
2 changed files with 14 additions and 4 deletions

View File

@@ -1458,5 +1458,17 @@ func Test_diff_only()
%bwipe!
endfunc
" This was causing invalid diff block values
" FIXME: somehow this causes a valgrind error when run directly but not when
" run as a test.
func Test_diff_manipulations()
set diff
split 0
sil! norm R
doobdeuR
doobdeuR
doobdeu
set nodiff
%bwipe!
endfunc