comparison src/testdir/test_diffmode.vim @ 29295:92dd6fef5ace v8.2.5164

patch 8.2.5164: invalid memory access after diff buffer manipulations Commit: https://github.com/vim/vim/commit/c101abff4c6756db4f5e740fde289decb9452efa Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 26 16:53:34 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 26 Jun 2022 18:00:02 +0200
parents bf4d7898cf93
children 922b87383277
comparison
equal deleted inserted replaced
29294:87c78d53b503 29295:92dd6fef5ace
1613 1613
1614 set nodiff 1614 set nodiff
1615 %bwipe! 1615 %bwipe!
1616 endfunc 1616 endfunc
1617 1617
1618 " This was causing invalid diff block values
1619 " FIXME: somehow this causes a valgrind error when run directly but not when
1620 " run as a test.
1621 func Test_diff_manipulations()
1622 set diff
1623 split 0
1624 sil! norm R
1625 doobdeuR
1626 doobdeuR
1627 doobdeu
1628
1629 set nodiff
1630 %bwipe!
1631 endfunc
1632
1618 1633
1619 " vim: shiftwidth=2 sts=2 expandtab 1634 " vim: shiftwidth=2 sts=2 expandtab