@@ -9,7 +9,7 @@ import { Position } from 'vs/editor/common/core/position';
9
9
import { Selection } from 'vs/editor/common/core/selection' ;
10
10
import { Handler } from 'vs/editor/common/editorCommon' ;
11
11
import { ITextModel } from 'vs/editor/common/model' ;
12
- import { DeleteAllLeftAction , DeleteAllRightAction , IndentLinesAction , InsertLineAfterAction , InsertLineBeforeAction , JoinLinesAction , LowerCaseAction , SortLinesAscendingAction , SortLinesDescendingAction , TransposeAction , UpperCaseAction } from 'vs/editor/contrib/linesOperations/linesOperations' ;
12
+ import { DeleteAllLeftAction , DeleteAllRightAction , IndentLinesAction , InsertLineAfterAction , InsertLineBeforeAction , JoinLinesAction , LowerCaseAction , SortLinesAscendingAction , SortLinesDescendingAction , TransposeAction , UpperCaseAction , DeleteLinesAction } from 'vs/editor/contrib/linesOperations/linesOperations' ;
13
13
import { withTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor' ;
14
14
import { createTextModel } from 'vs/editor/test/common/editorTestUtils' ;
15
15
@@ -879,4 +879,24 @@ suite('Editor Contrib - Line Operations', () => {
879
879
880
880
model . dispose ( ) ;
881
881
} ) ;
882
+
883
+ test ( 'issue #62112: Delete line does not work properly when multiple cursors are on line' , ( ) => {
884
+ const TEXT = [
885
+ 'a' ,
886
+ 'foo boo' ,
887
+ 'too' ,
888
+ 'c' ,
889
+ ] ;
890
+ withTestCodeEditor ( TEXT , { } , ( editor , cursor ) => {
891
+ editor . setSelections ( [
892
+ new Selection ( 2 , 4 , 2 , 4 ) ,
893
+ new Selection ( 2 , 8 , 2 , 8 ) ,
894
+ new Selection ( 3 , 4 , 3 , 4 ) ,
895
+ ] ) ;
896
+ const deleteLinesAction = new DeleteLinesAction ( ) ;
897
+ deleteLinesAction . run ( null , editor ) ;
898
+
899
+ assert . equal ( editor . getValue ( ) , 'a\nc' ) ;
900
+ } ) ;
901
+ } ) ;
882
902
} ) ;
0 commit comments