How about this?
I guess the key is ":setl scb | wincmd p", executing these two command
in one normal_cmd() session.
diff -r c015eedb9b4a src/testdir/test98.in
--- a/src/testdir/test98.in Sun Jul 14 15:06:50 2013 +0200
+++ b/src/testdir/test98.in Mon Jul 15 11:37:44 2013 +0900
@@ -1,7 +1,29 @@
Test for 'scrollbind' causing an unexpected scroll of one of the windows.
STARTTEST
:so small.vim
-:source test98a.in
+:" We don't want the status line to cause problems:
+:set laststatus=0
+: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
+:" Execute the following two command at once to reproduce the problem.
+:setl scb | wincmd p
+:setl scb
+:wincmd w
:let topLineLeft = line('w0')
:wincmd p
:let topLineRight = line('w0')
diff -r c015eedb9b4a src/testdir/test98a.in
--- a/src/testdir/test98a.in Sun Jul 14 15:06:50 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-" 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
-
-setl scb
-wincmd w
--
Yukihiro Nakadaira - [email protected]
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.