@@ -5,10 +5,6 @@ import { RangeUpdater } from "../core/updateSelections/RangeUpdater";
55import { callFunctionAndUpdateSelections } from "../core/updateSelections/updateSelections" ;
66import { ide } from "../singletons/ide.singleton" ;
77import { Target } from "../typings/target.types" ;
8- import {
9- setSelectionsAndFocusEditor ,
10- setSelectionsWithoutFocusingEditor ,
11- } from "../util/setSelectionsAndFocusEditor" ;
128import {
139 ensureSingleEditor ,
1410 ensureSingleTarget ,
@@ -95,11 +91,9 @@ export class CallbackAction {
9591
9692 // For this callback/command to the work we have to have the correct editor focused
9793 if ( options . setSelection ) {
98- await setSelectionsAndFocusEditor (
99- editableEditor ,
100- targetSelections ,
101- false ,
102- ) ;
94+ await editableEditor . setSelections ( targetSelections , {
95+ focusEditor : true ,
96+ } ) ;
10397 }
10498
10599 const [ updatedOriginalSelections , updatedTargetSelections ] =
@@ -116,10 +110,7 @@ export class CallbackAction {
116110 // very end. This code can run on multiple editors in the course of
117111 // one command, so we want to avoid focusing the editor multiple
118112 // times.
119- await setSelectionsWithoutFocusingEditor (
120- editableEditor ,
121- updatedOriginalSelections ,
122- ) ;
113+ await editableEditor . setSelections ( updatedOriginalSelections ) ;
123114 }
124115
125116 // If the document hasn't changed then we just return the original targets
0 commit comments