diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-10-07 17:46:42 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-10-07 17:46:42 +0200 |
commit | df77cef92ec034796723ffa3adb12e8b46daa98e (patch) | |
tree | b7106c402d4d687ede7623fcb1b954e5b879f8c4 /src/testdir/test_diffmode.vim | |
parent | 0cc7b2d6ccc79d6ce69f5405f9914a42cb4f615e (diff) |
patch 8.1.0458: ml_get error and crash when using "do"v8.1.0458
Problem: Ml_get error and crash when using "do".
Solution: Adjust cursor position also when diffupdate is not needed.
(Hirohito Higashi)
Diffstat (limited to 'src/testdir/test_diffmode.vim')
-rw-r--r-- | src/testdir/test_diffmode.vim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim index 760440a9b4..e1da19fefe 100644 --- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -277,6 +277,28 @@ func Test_dp_do_buffer() %bwipe! endfunc +func Test_do_lastline() + e! one + call setline(1, ['1','2','3','4','5','6']) + diffthis + + new two + call setline(1, ['2','4','5']) + diffthis + + 1 + norm dp]c + norm dp]c + wincmd w + call assert_equal(4, line('$')) + norm G + norm do + call assert_equal(3, line('$')) + + windo diffoff + %bwipe! +endfunc + func Test_diffoff() enew! call setline(1, ['Two', 'Three']) |