forked from aniani/vim
updated for version 7.4a.005
Problem: Scroll binding causes unexpected scroll. Solution: Store the topline after updating scroll binding. Add a test. (Lech Lorens)
This commit is contained in:
@@ -7801,7 +7801,10 @@ set_bool_option(opt_idx, varp, value, opt_flags)
|
|||||||
else if ((int *)varp == &curwin->w_p_scb)
|
else if ((int *)varp == &curwin->w_p_scb)
|
||||||
{
|
{
|
||||||
if (curwin->w_p_scb)
|
if (curwin->w_p_scb)
|
||||||
|
{
|
||||||
do_check_scrollbind(FALSE);
|
do_check_scrollbind(FALSE);
|
||||||
|
curwin->w_scbind_pos = curwin->w_topline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
|
|||||||
test76.out test77.out test78.out test79.out test80.out \
|
test76.out test77.out test78.out test79.out test80.out \
|
||||||
test81.out test82.out test83.out test84.out test88.out \
|
test81.out test82.out test83.out test84.out test88.out \
|
||||||
test89.out test90.out test91.out test92.out test93.out \
|
test89.out test90.out test91.out test92.out test93.out \
|
||||||
test94.out test95.out test96.out test97.out
|
test94.out test95.out test96.out test97.out test98.out
|
||||||
|
|
||||||
.SUFFIXES: .in .out
|
.SUFFIXES: .in .out
|
||||||
|
|
||||||
@@ -147,3 +147,4 @@ test94.out: test94.in
|
|||||||
test95.out: test95.in
|
test95.out: test95.in
|
||||||
test96.out: test96.in
|
test96.out: test96.in
|
||||||
test97.out: test97.in
|
test97.out: test97.in
|
||||||
|
test98.out: test98.in
|
||||||
|
@@ -32,7 +32,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
|
|||||||
test79.out test80.out test81.out test82.out test83.out \
|
test79.out test80.out test81.out test82.out test83.out \
|
||||||
test84.out test85.out test86.out test87.out test88.out \
|
test84.out test85.out test86.out test87.out test88.out \
|
||||||
test89.out test90.out test91.out test92.out test93.out \
|
test89.out test90.out test91.out test92.out test93.out \
|
||||||
test94.out test95.out test96.out
|
test94.out test95.out test96.out test98.out
|
||||||
|
|
||||||
SCRIPTS32 = test50.out test70.out
|
SCRIPTS32 = test50.out test70.out
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
|
|||||||
test79.out test80.out test81.out test82.out test83.out \
|
test79.out test80.out test81.out test82.out test83.out \
|
||||||
test84.out test85.out test86.out test87.out test88.out \
|
test84.out test85.out test86.out test87.out test88.out \
|
||||||
test89.out test90.out test91.out test92.out test93.out \
|
test89.out test90.out test91.out test92.out test93.out \
|
||||||
test94.out test95.out test96.out
|
test94.out test95.out test96.out test98.out
|
||||||
|
|
||||||
SCRIPTS32 = test50.out test70.out
|
SCRIPTS32 = test50.out test70.out
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
|
|||||||
test76.out test77.out test78.out test79.out test80.out \
|
test76.out test77.out test78.out test79.out test80.out \
|
||||||
test81.out test82.out test83.out test84.out test88.out \
|
test81.out test82.out test83.out test84.out test88.out \
|
||||||
test89.out test90.out test91.out test92.out test93.out \
|
test89.out test90.out test91.out test92.out test93.out \
|
||||||
test94.out test95.out test96.out
|
test94.out test95.out test96.out test98.out
|
||||||
|
|
||||||
.SUFFIXES: .in .out
|
.SUFFIXES: .in .out
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
|
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
|
||||||
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
|
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
|
||||||
#
|
#
|
||||||
# Last change: 2013 Jul 03
|
# Last change: 2013 Jul 09
|
||||||
#
|
#
|
||||||
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
|
# 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.
|
# Edit the lines in the Configuration section below to select.
|
||||||
@@ -78,7 +78,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
|
|||||||
test77.out test78.out test79.out test80.out test81.out \
|
test77.out test78.out test79.out test80.out test81.out \
|
||||||
test82.out test83.out test84.out test88.out test89.out \
|
test82.out test83.out test84.out test88.out test89.out \
|
||||||
test90.out test91.out test92.out test93.out test94.out \
|
test90.out test91.out test92.out test93.out test94.out \
|
||||||
test95.out test96.out test97.out
|
test95.out test96.out test97.out test98.out
|
||||||
|
|
||||||
# Known problems:
|
# Known problems:
|
||||||
# Test 30: a problem around mac format - unknown reason
|
# Test 30: a problem around mac format - unknown reason
|
||||||
|
@@ -29,7 +29,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
|
|||||||
test79.out test80.out test81.out test82.out test83.out \
|
test79.out test80.out test81.out test82.out test83.out \
|
||||||
test84.out test85.out test86.out test87.out test88.out \
|
test84.out test85.out test86.out test87.out test88.out \
|
||||||
test89.out test90.out test91.out test92.out test93.out \
|
test89.out test90.out test91.out test92.out test93.out \
|
||||||
test94.out test95.out test96.out test97.out
|
test94.out test95.out test96.out test97.out test98.out
|
||||||
|
|
||||||
SCRIPTS_GUI = test16.out
|
SCRIPTS_GUI = test16.out
|
||||||
|
|
||||||
|
21
src/testdir/test98.in
Normal file
21
src/testdir/test98.in
Normal file
@@ -0,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
|
||||||
|
|
1
src/testdir/test98.ok
Normal file
1
src/testdir/test98.ok
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Difference between the top lines (left - right): 0
|
27
src/testdir/test98a.in
Normal file
27
src/testdir/test98a.in
Normal file
@@ -0,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')
|
@@ -728,6 +728,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
5,
|
||||||
/**/
|
/**/
|
||||||
4,
|
4,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user