aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_diffmode.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
-rw-r--r--src/nvim/testdir/test_diffmode.vim31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim
index d95b29759e..90fd34d93e 100644
--- a/src/nvim/testdir/test_diffmode.vim
+++ b/src/nvim/testdir/test_diffmode.vim
@@ -279,13 +279,13 @@ func Test_diffopt_icase()
set diffopt=icase,foldcolumn:0
e one
- call setline(1, ['One', 'Two', 'Three', 'Four'])
+ call setline(1, ['One', 'Two', 'Three', 'Four', 'Fi#ve'])
redraw
let normattr = screenattr(1, 1)
diffthis
botright vert new two
- call setline(1, ['one', 'TWO', 'Three ', 'Four'])
+ call setline(1, ['one', 'TWO', 'Three ', 'Four', 'fI=VE'])
diffthis
redraw
@@ -294,6 +294,10 @@ func Test_diffopt_icase()
call assert_notequal(normattr, screenattr(3, 1))
call assert_equal(normattr, screenattr(4, 1))
+ let dtextattr = screenattr(5, 3)
+ call assert_notequal(dtextattr, screenattr(5, 1))
+ call assert_notequal(dtextattr, screenattr(5, 5))
+
diffoff!
%bwipe!
set diffopt&
@@ -371,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