@@ -1213,20 +1213,28 @@ func Test_edit_MOUSE()
12131213 10 new
12141214 call setline (1 , range (1 , 100 ))
12151215 call cursor (1 , 1 )
1216+ call assert_equal (1 , line (' w0' ))
1217+ call assert_equal (10 , line (' w$' ))
12161218 set mouse = a
1219+ " One scroll event moves three lines.
12171220 call feedkeys (" A\<ScrollWheelDown>\<esc> " , ' tnix' )
1218- call assert_equal ([ 0 , 4 , 1 , 0 ], getpos ( ' . ' ))
1219- " This should move by one pageDown, but only moves
1220- " by one line when the test is run.. .
1221+ call assert_equal (4 , line ( ' w0 ' ))
1222+ call assert_equal ( 13 , line ( ' w$ ' ))
1223+ " This should move by one page down .
12211224 call feedkeys (" A\<S-ScrollWheelDown>\<esc> " , ' tnix' )
1222- call assert_equal ([ 0 , 5 , 1 , 0 ], getpos ( ' . ' ))
1225+ call assert_equal (14 , line ( ' w0 ' ))
12231226 set nostartofline
1227+ " Another page down.
12241228 call feedkeys (" A\<C-ScrollWheelDown>\<esc> " , ' tnix' )
1225- call assert_equal ([0 , 6 , 1 , 0 ], getpos (' .' ))
1229+ call assert_equal (24 , line (' w0' ))
1230+
1231+ call assert_equal ([0 , 24 , 2 , 0 ], getpos (' .' ))
1232+ call test_setmouse (4 , 3 )
12261233 call feedkeys (" A\<LeftMouse>\<esc> " , ' tnix' )
1227- call assert_equal ([0 , 6 , 1 , 0 ], getpos (' .' ))
1228- call feedkeys (" A\<RightMouse>\<esc> " , ' tnix' )
1229- call assert_equal ([0 , 6 , 1 , 0 ], getpos (' .' ))
1234+ call assert_equal ([0 , 27 , 2 , 0 ], getpos (' .' ))
1235+ call test_setmouse (5 , 3 )
1236+ call feedkeys (" A\<RightMouse>\<esc>\<esc> " , ' tnix' )
1237+ call assert_equal ([0 , 28 , 2 , 0 ], getpos (' .' ))
12301238 call cursor (1 , 100 )
12311239 norm! zt
12321240 " this should move by a screen up, but when the test
0 commit comments