File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,16 @@ const getQuickPickSelectionEvent = (
102102 } )
103103 )
104104
105+ const itemsSelected = (
106+ quickPick : NumberQuickPick ,
107+ expectedSelectedCount : number
108+ ) =>
109+ new Promise ( resolve => {
110+ if ( quickPick . selectedItems . length === expectedSelectedCount ) {
111+ resolve ( undefined )
112+ }
113+ } )
114+
105115const toggleQuickPickItem = async (
106116 number : number ,
107117 numberInd : number ,
@@ -113,7 +123,10 @@ const toggleQuickPickItem = async (
113123 if ( itemInd === number ) {
114124 const selectionEvent = getQuickPickSelectionEvent ( quickPick , numberInd )
115125 await commands . executeCommand ( 'workbench.action.quickPickManyToggle' )
116- await selectionEvent
126+ await Promise . all ( [
127+ selectionEvent ,
128+ itemsSelected ( quickPick , numberInd + 1 )
129+ ] )
117130 }
118131 }
119132}
You can’t perform that action at this time.
0 commit comments