aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2022-01-27 23:23:26 +0000
committerGitHub <noreply@github.com>2022-01-27 23:23:26 +0000
commit815aa9f6425b34f1857a5b4213dff0dce6dda2b9 (patch)
tree90b5b1c6a02452712e93133f48328dc0e41bc72b /src/nvim/testdir/test_diffmode.vim
parent14751eaf70c6c0e55a9c2ec1ba3e4540a7e2d87f (diff)
parentd8adb3a72122aa36571acdff552dddf7aff3d4ff (diff)
downloadrneovim-815aa9f6425b34f1857a5b4213dff0dce6dda2b9.tar.gz
rneovim-815aa9f6425b34f1857a5b4213dff0dce6dda2b9.tar.bz2
rneovim-815aa9f6425b34f1857a5b4213dff0dce6dda2b9.zip
Merge pull request #16820 from seandewar/vim-8.1.2302
vim-patch:8.1.2302,8.2.{3936,4112}
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
-rw-r--r--src/nvim/testdir/test_diffmode.vim29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim
index 3a0c615cf6..482d39056f 100644
--- a/src/nvim/testdir/test_diffmode.vim
+++ b/src/nvim/testdir/test_diffmode.vim
@@ -1146,6 +1146,35 @@ func Test_diff_followwrap()
bwipe!
endfunc
+func Test_diff_maintains_change_mark()
+ func DiffMaintainsChangeMark()
+ 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
+
+ set diffopt-=internal
+ call DiffMaintainsChangeMark()
+ set diffopt+=internal
+ call DiffMaintainsChangeMark()
+
+ set diffopt&
+ delfunc DiffMaintainsChangeMark
+endfunc
+
func Test_diff_rnu()
CheckScreendump