@@ -2208,6 +2208,70 @@ suite('Editor Controller - Regression tests', () => {
22082208 } ) ;
22092209 } ) ;
22102210
2211+ test ( 'issue #98320: Multi-Cursor, Wrap lines and cursorSelectRight ==> cursors out of sync' , ( ) => {
2212+ // a single model line => 4 view lines
2213+ withTestCodeEditor ( [
2214+ [
2215+ 'lorem_ipsum-1993x11x13' ,
2216+ 'dolor_sit_amet-1998x04x27' ,
2217+ 'consectetur-2007x10x08' ,
2218+ 'adipiscing-2012x07x27' ,
2219+ 'elit-2015x02x27' ,
2220+ ] . join ( '\n' )
2221+ ] , { wordWrap : 'wordWrapColumn' , wordWrapColumn : 16 } , ( editor , viewModel ) => {
2222+ viewModel . setSelections ( 'test' , [
2223+ new Selection ( 1 , 13 , 1 , 13 ) ,
2224+ new Selection ( 2 , 16 , 2 , 16 ) ,
2225+ new Selection ( 3 , 13 , 3 , 13 ) ,
2226+ new Selection ( 4 , 12 , 4 , 12 ) ,
2227+ new Selection ( 5 , 6 , 5 , 6 ) ,
2228+ ] ) ;
2229+ assertCursor ( viewModel , [
2230+ new Selection ( 1 , 13 , 1 , 13 ) ,
2231+ new Selection ( 2 , 16 , 2 , 16 ) ,
2232+ new Selection ( 3 , 13 , 3 , 13 ) ,
2233+ new Selection ( 4 , 12 , 4 , 12 ) ,
2234+ new Selection ( 5 , 6 , 5 , 6 ) ,
2235+ ] ) ;
2236+
2237+ moveRight ( editor , viewModel , true ) ;
2238+ assertCursor ( viewModel , [
2239+ new Selection ( 1 , 13 , 1 , 14 ) ,
2240+ new Selection ( 2 , 16 , 2 , 17 ) ,
2241+ new Selection ( 3 , 13 , 3 , 14 ) ,
2242+ new Selection ( 4 , 12 , 4 , 13 ) ,
2243+ new Selection ( 5 , 6 , 5 , 7 ) ,
2244+ ] ) ;
2245+
2246+ moveRight ( editor , viewModel , true ) ;
2247+ assertCursor ( viewModel , [
2248+ new Selection ( 1 , 13 , 1 , 15 ) ,
2249+ new Selection ( 2 , 16 , 2 , 18 ) ,
2250+ new Selection ( 3 , 13 , 3 , 15 ) ,
2251+ new Selection ( 4 , 12 , 4 , 14 ) ,
2252+ new Selection ( 5 , 6 , 5 , 8 ) ,
2253+ ] ) ;
2254+
2255+ moveRight ( editor , viewModel , true ) ;
2256+ assertCursor ( viewModel , [
2257+ new Selection ( 1 , 13 , 1 , 16 ) ,
2258+ new Selection ( 2 , 16 , 2 , 19 ) ,
2259+ new Selection ( 3 , 13 , 3 , 16 ) ,
2260+ new Selection ( 4 , 12 , 4 , 15 ) ,
2261+ new Selection ( 5 , 6 , 5 , 9 ) ,
2262+ ] ) ;
2263+
2264+ moveRight ( editor , viewModel , true ) ;
2265+ assertCursor ( viewModel , [
2266+ new Selection ( 1 , 13 , 1 , 17 ) ,
2267+ new Selection ( 2 , 16 , 2 , 20 ) ,
2268+ new Selection ( 3 , 13 , 3 , 17 ) ,
2269+ new Selection ( 4 , 12 , 4 , 16 ) ,
2270+ new Selection ( 5 , 6 , 5 , 10 ) ,
2271+ ] ) ;
2272+ } ) ;
2273+ } ) ;
2274+
22112275 test ( 'issue #41573 - delete across multiple lines does not shrink the selection when word wraps' , ( ) => {
22122276 withTestCodeEditor ( [
22132277 'Authorization: \'Bearer pHKRfCTFSnGxs6akKlb9ddIXcca0sIUSZJutPHYqz7vEeHdMTMh0SGN0IGU3a0n59DXjTLRsj5EJ2u33qLNIFi9fk5XF8pK39PndLYUZhPt4QvHGLScgSkK0L4gwzkzMloTQPpKhqiikiIOvyNNSpd2o8j29NnOmdTUOKi9DVt74PD2ohKxyOrWZ6oZprTkb3eKajcpnS0LABKfaw2rmv4\','
0 commit comments