comparison src/testdir/test_scrollbind.vim @ 11961:0240e7e3d736 v8.0.0861

patch 8.0.0861: still many old style tests commit https://github.com/vim/vim/commit/4a137b45864310060410f34cb9c7d0f0231bb256 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 4 22:37:11 2017 +0200 patch 8.0.0861: still many old style tests Problem: Still many old style tests. Solution: Convert several tests to new style. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Fri, 04 Aug 2017 22:45:04 +0200
parents
children 687ab2b5252b
comparison
equal deleted inserted replaced
11960:e9776f970210 11961:0240e7e3d736
1 " Test for 'scrollbind' causing an unexpected scroll of one of the windows.
2 func Test_scrollbind()
3 " We don't want the status line to cause problems:
4 set laststatus=0
5 let totalLines = &lines * 20
6 let middle = totalLines / 2
7 new | only
8 for i in range(1, totalLines)
9 call setline(i, 'LINE ' . i)
10 endfor
11 exe string(middle)
12 normal zt
13 normal M
14 aboveleft vert new
15 for i in range(1, totalLines)
16 call setline(i, 'line ' . i)
17 endfor
18 exe string(middle)
19 normal zt
20 normal M
21 " Execute the following two commands at once to reproduce the problem.
22 setl scb | wincmd p
23 setl scb
24 wincmd w
25 let topLineLeft = line('w0')
26 wincmd p
27 let topLineRight = line('w0')
28 setl noscrollbind
29 wincmd p
30 setl noscrollbind
31 call assert_equal(0, topLineLeft - topLineRight)
32 endfunc