File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/vs/workbench/browser/parts/views Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -801,9 +801,10 @@ abstract class AbstractTreeView extends Disposable implements ITreeView {
801
801
802
802
this . tree ! . setFocus ( [ node ] ) ;
803
803
let selected = this . canSelectMany ? this . getSelection ( ) : [ ] ;
804
- if ( selected . length === 0 ) {
804
+ if ( ! selected . find ( item => item . handle === node . handle ) ) {
805
805
selected = [ node ] ;
806
806
}
807
+
807
808
const actions = treeMenus . getResourceContextActions ( selected ) ;
808
809
if ( ! actions . length ) {
809
810
return ;
@@ -1567,8 +1568,8 @@ class MultipleSelectionActionRunner extends ActionRunner {
1567
1568
} ) ;
1568
1569
}
1569
1570
1570
- if ( ! actionInSelected && selectionHandleArgs && selectionHandleArgs . length > 0 ) {
1571
- context = selectionHandleArgs [ 0 ] ;
1571
+ if ( ! actionInSelected && selectionHandleArgs ) {
1572
+ selectionHandleArgs = undefined ;
1572
1573
}
1573
1574
1574
1575
await action . run ( context , selectionHandleArgs ) ;
You can’t perform that action at this time.
0 commit comments