diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-11-16 18:43:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-16 18:43:03 -0800 |
commit | a45890e82e7cff52f9473d631a5439d2d368daa2 (patch) | |
tree | 8beada2a3533eff9722d5069499111ec889d33f8 /src/nvim/testdir | |
parent | 7116a41e30903580b7527203b87f6afb26095654 (diff) | |
parent | 3056ff4b8c39ea0679a564760c607021df4ad14f (diff) | |
download | rneovim-a45890e82e7cff52f9473d631a5439d2d368daa2.tar.gz rneovim-a45890e82e7cff52f9473d631a5439d2d368daa2.tar.bz2 rneovim-a45890e82e7cff52f9473d631a5439d2d368daa2.zip |
Merge #11406 from janlazo/vim-8.1.1922
vim-patch:8.1.{1922,2289,2305}
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_diffmode.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index 57b19aa817..21e0271bda 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -773,3 +773,28 @@ func Test_diff_of_diff() call StopVimInTerminal(buf) call delete('Xtest_diff_diff') endfunc + +func CloseoffSetup() + enew + call setline(1, ['one', 'two', 'three']) + diffthis + new + call setline(1, ['one', 'tow', 'three']) + diffthis + call assert_equal(1, &diff) + only! +endfunc + +func Test_diff_closeoff() + " "closeoff" included by default: last diff win gets 'diff' reset' + call CloseoffSetup() + call assert_equal(0, &diff) + enew! + + " "closeoff" excluded: last diff win keeps 'diff' set' + set diffopt-=closeoff + call CloseoffSetup() + call assert_equal(1, &diff) + diffoff! + enew! +endfunc |