mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-29 09:43:49 +01:00
fixes #102816
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user