diff options
| author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-11 14:55:02 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-11 15:06:07 -0400 |
| commit | 594536a1e71c90fd558501a675c459b8c7c242ea (patch) | |
| tree | 72b8a8a464da5f29a4909e8db8b917c08a4de627 /src/nvim/testdir/test_diffmode.vim | |
| parent | 90128843f68bc6b96cc7ab7a97d172aaae742aa4 (diff) | |
| download | rneovim-594536a1e71c90fd558501a675c459b8c7c242ea.tar.gz rneovim-594536a1e71c90fd558501a675c459b8c7c242ea.tar.bz2 rneovim-594536a1e71c90fd558501a675c459b8c7c242ea.zip | |
vim-patch:8.0.1361: some users don't want to diff with hidden buffers
Problem: Some users don't want to diff with hidden buffers.
Solution: Add the "hiddenoff" item to 'diffopt'. (Alisue, closes vim/vim#2394)
https://github.com/vim/vim/commit/97ce419201421f65f4764549ed80307a7ef9c7a6
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
| -rw-r--r-- | src/nvim/testdir/test_diffmode.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index f53fe438fc..90fd34d93e 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/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 |