This commit is contained in:
João Moreno
2020-08-05 12:13:30 +02:00
parent 2f2ba0d764
commit 391c92f52c
2 changed files with 5 additions and 7 deletions
+2
View File
@@ -465,6 +465,8 @@ export interface IView {
readonly id: string;
focus(): void;
isVisible(): boolean;
isBodyVisible(): boolean;
@@ -74,14 +74,10 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G },
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G },
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_G },
handler: accessor => {
handler: async accessor => {
const viewsService = accessor.get(IViewsService);
if (viewsService.isViewVisible(VIEW_PANE_ID)) {
viewsService.closeView(VIEW_PANE_ID);
} else {
viewsService.openView(VIEW_PANE_ID);
}
const view = await viewsService.openView(VIEW_PANE_ID);
view?.focus();
}
});