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 {
801801
802802 this . tree ! . setFocus ( [ node ] ) ;
803803 let selected = this . canSelectMany ? this . getSelection ( ) : [ ] ;
804- if ( selected . length === 0 ) {
804+ if ( ! selected . find ( item => item . handle === node . handle ) ) {
805805 selected = [ node ] ;
806806 }
807+
807808 const actions = treeMenus . getResourceContextActions ( selected ) ;
808809 if ( ! actions . length ) {
809810 return ;
@@ -1567,8 +1568,8 @@ class MultipleSelectionActionRunner extends ActionRunner {
15671568 } ) ;
15681569 }
15691570
1570- if ( ! actionInSelected && selectionHandleArgs && selectionHandleArgs . length > 0 ) {
1571- context = selectionHandleArgs [ 0 ] ;
1571+ if ( ! actionInSelected && selectionHandleArgs ) {
1572+ selectionHandleArgs = undefined ;
15721573 }
15731574
15741575 await action . run ( context , selectionHandleArgs ) ;
You can’t perform that action at this time.
0 commit comments