diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-25 20:09:23 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-25 20:48:21 +0800 |
| commit | 771564b00e5b64ac74be443dde84e160bc7fce05 (patch) | |
| tree | 95ee59485b9c1267044b763c5ff07c4b3e474a64 /src/nvim/testdir/test_diffmode.vim | |
| parent | 8543de3a862d55a762c130aa6a9d0e2a6c0b4838 (diff) | |
| download | rneovim-771564b00e5b64ac74be443dde84e160bc7fce05.tar.gz rneovim-771564b00e5b64ac74be443dde84e160bc7fce05.tar.bz2 rneovim-771564b00e5b64ac74be443dde84e160bc7fce05.zip | |
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.
https://github.com/vim/vim/commit/c101abff4c6756db4f5e740fde289decb9452efa
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
| -rw-r--r-- | src/nvim/testdir/test_diffmode.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index 7ab8d0347b..3eabad28d0 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -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 + " vim: shiftwidth=2 sts=2 expandtab |