@@ -5,10 +5,6 @@ import { RangeUpdater } from "../core/updateSelections/RangeUpdater";
5
5
import { callFunctionAndUpdateSelections } from "../core/updateSelections/updateSelections" ;
6
6
import { ide } from "../singletons/ide.singleton" ;
7
7
import { Target } from "../typings/target.types" ;
8
- import {
9
- setSelectionsAndFocusEditor ,
10
- setSelectionsWithoutFocusingEditor ,
11
- } from "../util/setSelectionsAndFocusEditor" ;
12
8
import {
13
9
ensureSingleEditor ,
14
10
ensureSingleTarget ,
@@ -95,11 +91,9 @@ export class CallbackAction {
95
91
96
92
// For this callback/command to the work we have to have the correct editor focused
97
93
if ( options . setSelection ) {
98
- await setSelectionsAndFocusEditor (
99
- editableEditor ,
100
- targetSelections ,
101
- false ,
102
- ) ;
94
+ await editableEditor . setSelections ( targetSelections , {
95
+ focusEditor : true ,
96
+ } ) ;
103
97
}
104
98
105
99
const [ updatedOriginalSelections , updatedTargetSelections ] =
@@ -116,10 +110,7 @@ export class CallbackAction {
116
110
// very end. This code can run on multiple editors in the course of
117
111
// one command, so we want to avoid focusing the editor multiple
118
112
// times.
119
- await setSelectionsWithoutFocusingEditor (
120
- editableEditor ,
121
- updatedOriginalSelections ,
122
- ) ;
113
+ await editableEditor . setSelections ( updatedOriginalSelections ) ;
123
114
}
124
115
125
116
// If the document hasn't changed then we just return the original targets
0 commit comments