@@ -141,7 +141,6 @@ suite('WordOperations', () => {
141141 moveWordLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 +5-3 + ' . length + 1 , '002' ) ;
142142 moveWordLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 +5-3 ' . length + 1 , '003' ) ;
143143 moveWordLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 +5-' . length + 1 , '004' ) ;
144- moveWordLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 +5' . length + 1 , '005' ) ;
145144 moveWordLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 +' . length + 1 , '006' ) ;
146145 moveWordLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 ' . length + 1 , '007' ) ;
147146 moveWordLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= ' . length + 1 , '008' ) ;
@@ -165,7 +164,6 @@ suite('WordOperations', () => {
165164 moveWordStartLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 +5-3 + ' . length + 1 , '002' ) ;
166165 moveWordStartLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 +5-3 ' . length + 1 , '003' ) ;
167166 moveWordStartLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 +5-' . length + 1 , '004' ) ;
168- moveWordStartLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 +5' . length + 1 , '005' ) ;
169167 moveWordStartLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 +' . length + 1 , '006' ) ;
170168 moveWordStartLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= 3 ' . length + 1 , '007' ) ;
171169 moveWordStartLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , ' /* Just some more text a+= ' . length + 1 , '008' ) ;
@@ -290,6 +288,18 @@ suite('WordOperations', () => {
290288 } ) ;
291289 } ) ;
292290
291+ test ( 'issue #48046: Word selection doesn\'t work as usual' , ( ) => {
292+ withTestCodeEditor ( [
293+ 'deep.object.property'
294+ ] , { } , ( editor , _ ) => {
295+ editor . setPosition ( new Position ( 1 , 21 ) ) ;
296+
297+ moveWordLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , 'deep.object.' . length + 1 , '001' ) ;
298+ moveWordLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , 'deep.' . length + 1 , '002' ) ;
299+ moveWordLeft ( editor ) ; assert . equal ( editor . getPosition ( ) . column , '' . length + 1 , '003' ) ;
300+ } ) ;
301+ } ) ;
302+
293303 test ( 'moveWordEndRight' , ( ) => {
294304 withTestCodeEditor ( [
295305 ' /* Just some more text a+= 3 +5-3 + 7 */ '
0 commit comments