To:
[email protected]
Subject: Patch 7.4a.005
Fcc: outbox
From: Bram Moolenaar <
[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.4a.005
Problem: Scroll binding causes unexpected scroll.
Solution: Store the topline after updating scroll binding. Add a test.
(Lech Lorens)
Files: src/testdir/test98.in, src/testdir/test98a.in,
src/testdir/test98.ok, src/option.c, src/testdir/Make_amiga.mak,
src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
src/testdir/Makefile
*** ../vim-7.4a.004/src/testdir/test98.in 2013-07-09 13:44:23.000000000 +0200
--- src/testdir/test98.in 2013-07-09 13:35:26.000000000 +0200
***************
*** 0 ****
--- 1,21 ----
+ Test for 'scrollbind' causing an unexpected scroll of one of the windows.
+ STARTTEST
+ :so small.vim
+ :source test98a.in
+ :let topLineLeft = line('w0')
+ :wincmd p
+ :let topLineRight = line('w0')
+ :setl noscrollbind
+ :wincmd p
+ :setl noscrollbind
+ :q!
+ :%del _
+ :call setline(1, 'Difference between the top lines (left - right): ' . string(topLineLeft - topLineRight))
+ :w! test.out
+ :brewind
+ ENDTEST
+
+ STARTTEST
+ :qa!
+ ENDTEST
+
*** ../vim-7.4a.004/src/testdir/test98a.in 2013-07-09 13:44:23.000000000 +0200
--- src/testdir/test98a.in 2013-07-09 13:33:06.000000000 +0200
***************
*** 0 ****
--- 1,27 ----
+ " We don't want the status line to cause problems:
+ set laststatus=0
+ redraw!
+ let g:totalLines = &lines * 20
+ let middle = g:totalLines / 2
+ wincmd n
+ wincmd o
+ for i in range(1, g:totalLines)
+ call setline(i, 'LINE ' . i)
+ endfor
+
+ exe string(middle)
+ normal zt
+ normal M
+
+ aboveleft vert new
+ for i in range(1, g:totalLines)
+ call setline(i, 'line ' . i)
+ endfor
+ exe string(middle)
+ normal zt
+ normal M
+ setl scb
+
+ wincmd p
+
+ call feedkeys(":setl scb\n\<C-w>\<C-w>", 't')
*** ../vim-7.4a.004/src/testdir/test98.ok 2013-07-09 13:44:23.000000000 +0200
--- src/testdir/test98.ok 2013-07-09 13:36:08.000000000 +0200
***************
*** 0 ****
--- 1 ----
+ Difference between the top lines (left - right): 0
*** ../vim-7.4a.004/src/option.c 2013-07-03 15:35:37.000000000 +0200
--- src/option.c 2013-07-09 13:38:16.000000000 +0200
***************
*** 7801,7807 ****
--- 7801,7810 ----
else if ((int *)varp == &curwin->w_p_scb)
{
if (curwin->w_p_scb)
+ {
do_check_scrollbind(FALSE);
+ curwin->w_scbind_pos = curwin->w_topline;
+ }
}
#endif
*** ../vim-7.4a.004/src/testdir/Make_amiga.mak 2013-07-03 16:21:39.000000000 +0200
--- src/testdir/Make_amiga.mak 2013-07-09 13:40:02.000000000 +0200
***************
*** 33,39 ****
test76.out test77.out test78.out test79.out test80.out \
test81.out test82.out test83.out test84.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
! test94.out test95.out test96.out test97.out
.SUFFIXES: .in .out
--- 33,39 ----
test76.out test77.out test78.out test79.out test80.out \
test81.out test82.out test83.out test84.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
! test94.out test95.out test96.out test97.out test98.out
.SUFFIXES: .in .out
***************
*** 147,149 ****
--- 147,150 ----
test95.out: test95.in
test96.out: test96.in
test97.out: test97.in
+ test98.out: test98.in
*** ../vim-7.4a.004/src/testdir/Make_dos.mak 2013-07-03 20:17:26.000000000 +0200
--- src/testdir/Make_dos.mak 2013-07-09 13:40:30.000000000 +0200
***************
*** 32,38 ****
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
! test94.out test95.out test96.out
SCRIPTS32 = test50.out test70.out
--- 32,38 ----
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
! test94.out test95.out test96.out test98.out
SCRIPTS32 = test50.out test70.out
*** ../vim-7.4a.004/src/testdir/Make_ming.mak 2013-07-03 20:17:22.000000000 +0200
--- src/testdir/Make_ming.mak 2013-07-09 13:40:38.000000000 +0200
***************
*** 52,58 ****
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
! test94.out test95.out test96.out
SCRIPTS32 = test50.out test70.out
--- 52,58 ----
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
! test94.out test95.out test96.out test98.out
SCRIPTS32 = test50.out test70.out
*** ../vim-7.4a.004/src/testdir/Make_os2.mak 2013-07-03 20:18:09.000000000 +0200
--- src/testdir/Make_os2.mak 2013-07-09 13:40:43.000000000 +0200
***************
*** 34,40 ****
test76.out test77.out test78.out test79.out test80.out \
test81.out test82.out test83.out test84.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
! test94.out test95.out test96.out
.SUFFIXES: .in .out
--- 34,40 ----
test76.out test77.out test78.out test79.out test80.out \
test81.out test82.out test83.out test84.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
! test94.out test95.out test96.out test98.out
.SUFFIXES: .in .out
*** ../vim-7.4a.004/src/testdir/Make_vms.mms 2013-07-03 16:21:54.000000000 +0200
--- src/testdir/Make_vms.mms 2013-07-09 13:40:47.000000000 +0200
***************
*** 4,10 ****
# Authors: Zoltan Arpadffy, <
[email protected]>
# Sandor Kopanyi, <
[email protected]>
#
! # Last change: 2013 Jul 03
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
--- 4,10 ----
# Authors: Zoltan Arpadffy, <
[email protected]>
# Sandor Kopanyi, <
[email protected]>
#
! # Last change: 2013 Jul 09
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
***************
*** 78,84 ****
test77.out test78.out test79.out test80.out test81.out \
test82.out test83.out test84.out test88.out test89.out \
test90.out test91.out test92.out test93.out test94.out \
! test95.out test96.out test97.out
# Known problems:
# Test 30: a problem around mac format - unknown reason
--- 78,84 ----
test77.out test78.out test79.out test80.out test81.out \
test82.out test83.out test84.out test88.out test89.out \
test90.out test91.out test92.out test93.out test94.out \
! test95.out test96.out test97.out test98.out
# Known problems:
# Test 30: a problem around mac format - unknown reason
*** ../vim-7.4a.004/src/testdir/Makefile 2013-07-03 16:20:47.000000000 +0200
--- src/testdir/Makefile 2013-07-09 13:40:55.000000000 +0200
***************
*** 29,35 ****
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
! test94.out test95.out test96.out test97.out
SCRIPTS_GUI = test16.out
--- 29,35 ----
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
! test94.out test95.out test96.out test97.out test98.out
SCRIPTS_GUI = test16.out
*** ../vim-7.4a.004/src/version.c 2013-07-09 13:15:42.000000000 +0200
--- src/version.c 2013-07-09 13:37:52.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 5,
/**/
--
A law to reduce crime states: "It is mandatory for a motorist with criminal
intentions to stop at the city limits and telephone the chief of police as he
is entering the town.
[real standing law in Washington, United States of America]
/// Bram Moolenaar --
[email protected] --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///