提交 f98cff8f 编写于 作者: J Joao Moreno

fixes #70681

上级 5663d651
......@@ -582,8 +582,14 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
else if (focused instanceof ObjectTree || focused instanceof DataTree || focused instanceof AsyncDataTree) {
const list = focused;
const fakeKeyboardEvent = getSelectionKeyboardEvent('keydown', false);
list.setSelection(list.getFocus(), fakeKeyboardEvent);
list.open(list.getFocus(), fakeKeyboardEvent);
const focus = list.getFocus();
if (focus.length > 0) {
list.toggleCollapsed(focus[0]);
}
list.setSelection(focus, fakeKeyboardEvent);
list.open(focus, fakeKeyboardEvent);
}
// Tree
......
......@@ -337,17 +337,6 @@ export class ExplorerView extends ViewletPanel {
}));
this.disposables.push(this.tree.onContextMenu(e => this.onContextMenu(e)));
this.disposables.push(this.tree.onKeyDown(e => {
const event = new StandardKeyboardEvent(e);
const toggleCollapsed = isMacintosh ? (event.keyCode === KeyCode.DownArrow && event.metaKey) : event.keyCode === KeyCode.Enter;
if (toggleCollapsed && !this.explorerService.isEditable(undefined)) {
const focus = this.tree.getFocus();
if (focus.length === 1 && focus[0].isDirectory) {
this.tree.toggleCollapsed(focus[0]);
}
}
}));
// save view state on shutdown
this.storageService.onWillSaveState(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册