comparison src/testdir/test_diffmode.vim @ 12971:ca3cb1997f08 v8.0.1361

patch 8.0.1361: some users don't want to diff with hidden buffers commit https://github.com/vim/vim/commit/97ce419201421f65f4764549ed80307a7ef9c7a6 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 1 20:35:58 2017 +0100 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 https://github.com/vim/vim/issues/2394)
author Christian Brabandt <cb@256bit.org>
date Fri, 01 Dec 2017 20:45:08 +0100
parents 1fad9675d8fd
children 195e8b1fcbbf
comparison
equal deleted inserted replaced
12970:06d24dd1299b 12971:ca3cb1997f08
373 set diffopt& 373 set diffopt&
374 diffoff! 374 diffoff!
375 %bwipe 375 %bwipe
376 endfunc 376 endfunc
377 377
378 func Test_diffopt_hiddenoff()
379 set diffopt=filler,foldcolumn:0,hiddenoff
380 e! one
381 call setline(1, ['Two', 'Three'])
382 redraw
383 let normattr = screenattr(1, 1)
384 diffthis
385 botright vert new two
386 call setline(1, ['One', 'Four'])
387 diffthis
388 redraw
389 call assert_notequal(normattr, screenattr(1, 1))
390 set hidden
391 close
392 redraw
393 " should not diffing with hidden buffer two while 'hiddenoff' is enabled
394 call assert_equal(normattr, screenattr(1, 1))
395
396 bwipe!
397 bwipe!
398 set hidden& diffopt&
399 endfunc
400
378 func Test_diffoff_hidden() 401 func Test_diffoff_hidden()
379 set diffopt=filler,foldcolumn:0 402 set diffopt=filler,foldcolumn:0
380 e! one 403 e! one
381 call setline(1, ['Two', 'Three']) 404 call setline(1, ['Two', 'Three'])
382 redraw 405 redraw