aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2017-09-11 22:17:41 +0800
committerJames McCoy <jamessan@jamessan.com>2017-09-11 10:17:41 -0400
commitd2cbc311855114b7736919a344a82e303d4a8164 (patch)
tree295e5fa24b4af78d262ed5e7c01daf9f0129f493 /src/nvim/testdir
parentf51a397010dcf4a8308c3b0249810696375b82b2 (diff)
downloadrneovim-d2cbc311855114b7736919a344a82e303d4a8164.tar.gz
rneovim-d2cbc311855114b7736919a344a82e303d4a8164.tar.bz2
rneovim-d2cbc311855114b7736919a344a82e303d4a8164.zip
Vim-patch 8.0.0300 (#7258)
vim-patch:8.0.0300 Problem: Cannot stop diffing hidden buffers. (Daniel Hahler) Solution: When using :diffoff! make the whole list if diffed buffers empty. (closes vim/vim#736) https://github.com/vim/vim/commit/25ea0544587dd45088512fec9d7a685e35fea679
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_diffmode.vim37
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)