aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-12-29 02:01:02 +0000
committerzeertzjq <zeertzjq@outlook.com>2022-01-27 18:47:52 +0800
commit5864edac7be49a0cd0080a65330dd7661ffb5641 (patch)
tree3360d4cb093ca588b9a50a9b409ad85dab953109 /src/nvim/testdir/test_diffmode.vim
parent3d0149f9848e22e7eb15652b1ec01d5920bd680a (diff)
downloadrneovim-5864edac7be49a0cd0080a65330dd7661ffb5641.tar.gz
rneovim-5864edac7be49a0cd0080a65330dd7661ffb5641.tar.bz2
rneovim-5864edac7be49a0cd0080a65330dd7661ffb5641.zip
vim-patch:8.1.2302: :lockmarks does not work for '[ and ']
Problem: :lockmarks does not work for '[ and ']. Solution: save and restore '[ and '] marks. (James McCoy, closes vim/vim#5222) https://github.com/vim/vim/commit/f4a1d1c0542df151bc59ac3b798ed198b5c71ccc Test_diff_maintains_change_mark doesn't actually fail without these changes. This is fixed in v8.2.3936.
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
-rw-r--r--src/nvim/testdir/test_diffmode.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim
index 3a0c615cf6..fe928c0f65 100644
--- a/src/nvim/testdir/test_diffmode.vim
+++ b/src/nvim/testdir/test_diffmode.vim
@@ -1146,6 +1146,25 @@ func Test_diff_followwrap()
bwipe!
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
+
func Test_diff_rnu()
CheckScreendump