view src/testdir/test47.in @ 9007:d5c6f1c5cd28 v7.4.1789

commit https://github.com/vim/vim/commit/437905c25d4cedfa16d0f87392e4a000d22362b7 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 26 19:01:05 2016 +0200 patch 7.4.1789 Problem: Cannot use ch_read() in the close callback. Solution: Do not discard the channel if there is readahead. Do not discard readahead if there is a close callback.
author Christian Brabandt <cb@256bit.org>
date Tue, 26 Apr 2016 19:15:06 +0200
parents 20ed78fab428
children
line wrap: on
line source

Tests for vertical splits and filler lines in diff mode

Also tests restoration of saved options by :diffoff.

STARTTEST
:so small.vim
:" Disable the title to avoid xterm keeping the wrong one.
:set notitle noicon
/^1
yG:new
pkdd:w! Xtest
ddGpkkrXoxxx:w! Xtest2
:file Nop
ggoyyyjjjozzzz
:set foldmethod=marker foldcolumn=4
:redir => nodiffsettings
:silent! :set diff? fdm? fdc? scb? crb? wrap?
:redir END
:vert diffsplit Xtest
:vert diffsplit Xtest2
:redir => diffsettings
:silent! :set diff? fdm? fdc? scb? crb? wrap?
:redir END
:let diff_fdm = &fdm
:let diff_fdc = &fdc
:" repeat entering diff mode here to see if this saves the wrong settings
:diffthis
:" jump to second window for a moment to have filler line appear at start of
:" first window
ggpgg:let one = winline()
j:let one = one . "-" . winline()
j:let one = one . "-" . winline()
j:let one = one . "-" . winline()
j:let one = one . "-" . winline()
j:let one = one . "-" . winline()
gg:let two = winline()
j:let two = two . "-" . winline()
j:let two = two . "-" . winline()
j:let two = two . "-" . winline()
j:let two = two . "-" . winline()
gg:let three = winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
:call append("$", one)
:call append("$", two)
:call append("$", three)
:$-2,$w! test.out
:"
:" Test diffoff
:diffoff!
1
:let &diff = 1
:let &fdm = diff_fdm
:let &fdc = diff_fdc
4
:diffoff!
:$put =nodiffsettings
:$put =diffsettings
1
:redir => nd1
:silent! :set diff? fdm? fdc? scb? crb? wrap?
:redir END

:redir => nd2
:silent! :set diff? fdm? fdc? scb? crb? wrap?
:redir END

:redir => nd3
:silent! :set diff? fdm? fdc? scb? crb? wrap?
:redir END

:$put =nd1
:$put =nd2
:$put =nd3
:$-39,$w >> test.out
:"
:" Test that diffing shows correct filler lines
:windo :bw!
:enew
:put =range(4,10)
:1d _
:vnew
:put =range(1,10)
:1d _
:windo :diffthis
:wincmd h
:let w0=line('w0')
:enew
:put =w0
:.w >> test.out
:unlet! one two three nodiffsettings diffsettings diff_fdm diff_fdc nd1 nd2 nd3 w0
:qa!
ENDTEST

1 aa
2 bb
3 cc
4 dd
5 ee