diff options
| author | ckelsel <ckelsel@hotmail.com> | 2017-09-13 20:45:12 +0800 |
|---|---|---|
| committer | ckelsel <ckelsel@hotmail.com> | 2017-09-13 20:45:12 +0800 |
| commit | bf80a68d0d0a093c4764b53eb69e43cbb4363af2 (patch) | |
| tree | 295e5fa24b4af78d262ed5e7c01daf9f0129f493 /src/nvim/testdir/test_diffmode.vim | |
| parent | 5ad5bb0c0c1be5fec7e3073dc63d30e19ad26a82 (diff) | |
| parent | d2cbc311855114b7736919a344a82e303d4a8164 (diff) | |
| download | rneovim-bf80a68d0d0a093c4764b53eb69e43cbb4363af2.tar.gz rneovim-bf80a68d0d0a093c4764b53eb69e43cbb4363af2.tar.bz2 rneovim-bf80a68d0d0a093c4764b53eb69e43cbb4363af2.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
| -rw-r--r-- | src/nvim/testdir/test_diffmode.vim | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index f40e06ff33..8ee82bd538 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -212,6 +212,7 @@ func Test_diffoff() call setline(1, ['One', '', 'Two', 'Three']) diffthis redraw + call assert_notequal(normattr, screenattr(1, 1)) diffoff! redraw call assert_equal(normattr, screenattr(1, 1)) @@ -219,6 +220,42 @@ func Test_diffoff() bwipe! endfunc +func Test_diffoff_hidden() + set diffopt=filler,foldcolumn:0 + e! one + call setline(1, ['Two', 'Three']) + 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 + " diffing with hidden buffer two + call assert_notequal(normattr, screenattr(1, 1)) + diffoff + redraw + call assert_equal(normattr, screenattr(1, 1)) + diffthis + redraw + " still diffing with hidden buffer two + call assert_notequal(normattr, screenattr(1, 1)) + diffoff! + redraw + call assert_equal(normattr, screenattr(1, 1)) + diffthis + redraw + " no longer diffing with hidden buffer two + call assert_equal(normattr, screenattr(1, 1)) + + bwipe! + bwipe! + set hidden& diffopt& +endfunc + func Test_setting_cursor() new Xtest1 put =range(1,90) |