annotate src/testdir/test98.in @ 7426:779a7c14c795 v7.4.1017

commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 1 14:48:20 2016 +0100 patch 7.4.1017 Problem: When there is a backslash in an option ":set -=" doesn't work. Solution: Handle a backslash better. (Jacob Niehus) Add a new test, merge in old test.
author Christian Brabandt <cb@256bit.org>
date Fri, 01 Jan 2016 15:00:04 +0100
parents fa024ce48542
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5157
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Test for 'scrollbind' causing an unexpected scroll of one of the windows.
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 STARTTEST
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 :so small.vim
5214
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
4 :" We don't want the status line to cause problems:
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
5 :set laststatus=0
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
6 :let g:totalLines = &lines * 20
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
7 :let middle = g:totalLines / 2
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
8 :wincmd n
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
9 :wincmd o
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
10 :for i in range(1, g:totalLines)
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
11 : call setline(i, 'LINE ' . i)
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
12 :endfor
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
13 :exe string(middle)
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
14 :normal zt
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
15 :normal M
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
16 :aboveleft vert new
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
17 :for i in range(1, g:totalLines)
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
18 : call setline(i, 'line ' . i)
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
19 :endfor
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
20 :exe string(middle)
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
21 :normal zt
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
22 :normal M
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
23 :" Execute the following two command at once to reproduce the problem.
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
24 :setl scb | wincmd p
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
25 :setl scb
fa024ce48542 updated for version 7.4a.033
Bram Moolenaar <bram@vim.org>
parents: 5157
diff changeset
26 :wincmd w
5157
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :let topLineLeft = line('w0')
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :wincmd p
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :let topLineRight = line('w0')
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :setl noscrollbind
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 :wincmd p
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :setl noscrollbind
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 :q!
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 :%del _
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 :call setline(1, 'Difference between the top lines (left - right): ' . string(topLineLeft - topLineRight))
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :w! test.out
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 :brewind
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 ENDTEST
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 STARTTEST
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 :qa!
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 ENDTEST
7a6ce0c426fe updated for version 7.4a.005
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43