File tree Expand file tree Collapse file tree
src/vs/workbench/browser/actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -655,18 +655,17 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
655655 const focused = accessor . get ( IListService ) . lastFocusedList ;
656656
657657 // Tree only
658- if ( focused && ! ( focused instanceof List || focused instanceof PagedList ) ) {
659- if ( focused instanceof ObjectTree || focused instanceof DataTree || focused instanceof AsyncDataTree ) {
660- const tree = focused ;
661- const focus = tree . getFocus ( ) ;
662-
663- if ( focus . length === 0 ) {
664- return ;
665- }
658+ if ( focused instanceof ObjectTree || focused instanceof DataTree || focused instanceof AsyncDataTree ) {
659+ const tree = focused ;
660+ const focus = tree . getFocus ( ) ;
666661
662+ if ( focus . length > 0 && tree . isCollapsible ( focus [ 0 ] ) ) {
667663 tree . toggleCollapsed ( focus [ 0 ] ) ;
664+ return ;
668665 }
669666 }
667+
668+ focusElement ( accessor , true ) ;
670669 }
671670} ) ;
672671
You can’t perform that action at this time.
0 commit comments