diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-12-01 20:35:58 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-12-01 20:35:58 +0100 |
commit | 97ce419201421f65f4764549ed80307a7ef9c7a6 (patch) | |
tree | 0ba380c7872e3fed3b109a4af087b7c3b4417e73 /src/testdir/test_diffmode.vim | |
parent | 76bb7196f5102c9929959d710e8ed97a19affa4d (diff) |
patch 8.0.1361: some users don't want to diff with hidden buffersv8.0.1361
Problem: Some users don't want to diff with hidden buffers.
Solution: Add the "hiddenoff" item to 'diffopt'. (Alisue, closes #2394)
Diffstat (limited to 'src/testdir/test_diffmode.vim')
-rw-r--r-- | src/testdir/test_diffmode.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim index 3273dcbd5f..d6c5c83fe5 100644 --- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -375,6 +375,29 @@ func Test_diffopt_vertical() %bwipe endfunc +func Test_diffopt_hiddenoff() + set diffopt=filler,foldcolumn:0,hiddenoff + e! one + call setline(1, ['Two', 'Three']) + redraw + let normattr = screenattr(1, 1) + diffthis + botright vert new two + call setline(1, ['One', 'Four']) + diffthis + redraw + call assert_notequal(normattr, screenattr(1, 1)) + set hidden + close + redraw + " should not diffing with hidden buffer two while 'hiddenoff' is enabled + call assert_equal(normattr, screenattr(1, 1)) + + bwipe! + bwipe! + set hidden& diffopt& +endfunc + func Test_diffoff_hidden() set diffopt=filler,foldcolumn:0 e! one |