diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-11-16 13:50:25 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-11-16 13:50:25 +0100 |
commit | f4a1d1c0542df151bc59ac3b798ed198b5c71ccc (patch) | |
tree | 9f6051c5c5e75c7f113a923f7888f0f272ddee9e /src/testdir/test_diffmode.vim | |
parent | ab85ca4e6a40b2998db7b00896505486f5c16b41 (diff) | |
download | vim-git-f4a1d1c0542df151bc59ac3b798ed198b5c71ccc.tar.gz |
patch 8.1.2302: :lockmarks does not work for '[ and ']v8.1.2302
Problem: :lockmarks does not work for '[ and '].
Solution: save and restore '[ and '] marks. (James McCoy, closes #5222)
Diffstat (limited to 'src/testdir/test_diffmode.vim')
-rw-r--r-- | src/testdir/test_diffmode.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim index 6f4eaaf43..9dfe2fefc 100644 --- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -989,3 +989,22 @@ func Test_diff_closeoff() diffoff! enew! endfunc + +func Test_diff_maintains_change_mark() + enew! + call setline(1, ['a', 'b', 'c', 'd']) + diffthis + new + call setline(1, ['a', 'b', 'c', 'e']) + " Set '[ and '] marks + 2,3yank + call assert_equal([2, 3], [line("'["), line("']")]) + " Verify they aren't affected by the implicit diff + diffthis + call assert_equal([2, 3], [line("'["), line("']")]) + " Verify they aren't affected by an explicit diff + diffupdate + call assert_equal([2, 3], [line("'["), line("']")]) + bwipe! + bwipe! +endfunc |