@@ -107,7 +107,7 @@ suite('Editor Commands - ShiftCommand', () => {
107107 '' ,
108108 '123'
109109 ] ,
110- new Selection ( 1 , 2 , 1 , 2 )
110+ new Selection ( 1 , 1 , 1 , 2 )
111111 ) ;
112112 } ) ;
113113
@@ -130,7 +130,7 @@ suite('Editor Commands - ShiftCommand', () => {
130130 '' ,
131131 '123'
132132 ] ,
133- new Selection ( 1 , 4 , 1 , 2 )
133+ new Selection ( 1 , 4 , 1 , 1 )
134134 ) ;
135135 } ) ;
136136
@@ -153,7 +153,7 @@ suite('Editor Commands - ShiftCommand', () => {
153153 '' ,
154154 '123'
155155 ] ,
156- new Selection ( 1 , 2 , 1 , 4 )
156+ new Selection ( 1 , 1 , 1 , 4 )
157157 ) ;
158158 } ) ;
159159
@@ -176,7 +176,7 @@ suite('Editor Commands - ShiftCommand', () => {
176176 '' ,
177177 '123'
178178 ] ,
179- new Selection ( 1 , 2 , 2 , 1 )
179+ new Selection ( 1 , 1 , 2 , 1 )
180180 ) ;
181181 } ) ;
182182
@@ -199,7 +199,7 @@ suite('Editor Commands - ShiftCommand', () => {
199199 '' ,
200200 '123'
201201 ] ,
202- new Selection ( 1 , 2 , 2 , 1 )
202+ new Selection ( 1 , 1 , 2 , 1 )
203203 ) ;
204204
205205 testShiftCommand (
@@ -312,7 +312,7 @@ suite('Editor Commands - ShiftCommand', () => {
312312 '' ,
313313 '\t123'
314314 ] ,
315- new Selection ( 1 , 2 , 5 , 3 )
315+ new Selection ( 1 , 1 , 5 , 3 )
316316 ) ;
317317
318318 testShiftCommand (
@@ -333,7 +333,7 @@ suite('Editor Commands - ShiftCommand', () => {
333333 '\t' ,
334334 '123'
335335 ] ,
336- new Selection ( 4 , 2 , 5 , 1 )
336+ new Selection ( 4 , 1 , 5 , 1 )
337337 ) ;
338338 } ) ;
339339
@@ -538,7 +538,7 @@ suite('Editor Commands - ShiftCommand', () => {
538538 '' ,
539539 '\t123'
540540 ] ,
541- new Selection ( 1 , 2 , 5 , 5 )
541+ new Selection ( 1 , 1 , 5 , 5 )
542542 ) ;
543543 } ) ;
544544
@@ -703,7 +703,7 @@ suite('Editor Commands - ShiftCommand', () => {
703703 ' eleven | 11' ,
704704 '' ,
705705 ] ,
706- new Selection ( 1 , 5 , 13 , 1 )
706+ new Selection ( 1 , 1 , 13 , 1 )
707707 ) ;
708708 } ) ;
709709
@@ -839,6 +839,28 @@ suite('Editor Commands - ShiftCommand', () => {
839839 ) ;
840840 } ) ;
841841
842+ test ( 'issue Microsoft/monaco-editor#443: Indentation of a single row deletes selected text in some cases' , ( ) => {
843+ testCommand (
844+ [
845+ 'Hello world!' ,
846+ 'another line'
847+ ] ,
848+ null ,
849+ new Selection ( 1 , 1 , 1 , 13 ) ,
850+ ( sel ) => new ShiftCommand ( sel , {
851+ isUnshift : false ,
852+ tabSize : 4 ,
853+ oneIndent : '\t' ,
854+ useTabStops : true
855+ } ) ,
856+ [
857+ '\tHello world!' ,
858+ 'another line'
859+ ] ,
860+ new Selection ( 1 , 1 , 1 , 14 )
861+ ) ;
862+ } ) ;
863+
842864 test ( 'bug #16815:Shift+Tab doesn\'t go back to tabstop' , ( ) => {
843865
844866 var repeatStr = ( str : string , cnt : number ) : string => {
0 commit comments