diff src/testdir/test_diffmode.vim @ 29519:3afe997f4415 v9.0.0101

patch 9.0.0101: invalid memory access in diff mode with "dp" and undo Commit: https://github.com/vim/vim/commit/4e677b9c40ccbc5f090971b31dc2fe07bf05541d Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 28 18:44:27 2022 +0100 patch 9.0.0101: invalid memory access in diff mode with "dp" and undo Problem: Invalid memory access in diff mode with "dp" and undo. Solution: Make sure the line number does not go below one.
author Bram Moolenaar <Bram@vim.org>
date Thu, 28 Jul 2022 19:45:06 +0200
parents 922b87383277
children 2e2f57f2875d
line wrap: on
line diff
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -1628,5 +1628,19 @@ func Test_diff_manipulations()
   %bwipe!
 endfunc
 
+" This was causing the line number in the diff block to go below one.
+" FIXME: somehow this causes a valgrind error when run directly but not when
+" run as a test.
+func Test_diff_put_and_undo()
+  set diff
+  next 0
+  split 00
+  sil! norm o0gguudpo0ggJuudp
+
+  bwipe!
+  bwipe!
+  set nodiff
+endfunc
+
 
 " vim: shiftwidth=2 sts=2 expandtab