diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-12-29 16:44:48 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-29 16:44:48 +0000 |
commit | ccc1644f95e7833c23fa0d440e42293c1622fdcb (patch) | |
tree | 21ab64eff4d8cb02183f2e9ac387e0092cd02a65 /src | |
parent | 5d20fbf2e79b96a39abbdadc486b656cdcc67ed6 (diff) |
patch 8.2.3936: no proper test for maintaining change mark in diff modev8.2.3936
Problem: No proper test for maintaining change mark in diff mode.
Solution: Run the test with internal and external diff. (Sean Dewar,
closes #9424)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_diffmode.vim | 40 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 26 insertions, 16 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim index e47928df88..b10f96d42d 100644 --- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -1189,22 +1189,30 @@ func Test_diff_followwrap() 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! + 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& endfunc " Test for 'patchexpr' diff --git a/src/version.c b/src/version.c index 6849bd998b..8aebc2c80c 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3936, +/**/ 3935, /**/ 3934, |