Skip to content

Commit

Permalink
use Ctrl/Cmd+. to toggle the Output box
Browse files Browse the repository at this point in the history
  • Loading branch information
KasraF committed Mar 22, 2023
1 parent 2bd6d43 commit 736a72a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/vs/editor/contrib/rtv/browser/RTVDisplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2303,6 +2303,10 @@ export class RTVController implements IRTVController {
return editorMode !== undefined && editorMode !== 'Log'; //'Log' is the language identifier for the output editor
}

public isOutputBoxShown() {
return !this.getOutputBox().isHidden();
}

public showOutputBox() {
this.getRunButton().setButtonToHide();
this.getOutputBox().show();
Expand Down Expand Up @@ -4036,3 +4040,17 @@ createRTVAction(
c.decreaseDelay();
}
);

createRTVAction(
'rtv.toggleOutputBox',
'Toggle displaying the output box',
KeyMod.CtrlCmd | KeyCode.Period,
localize('rtv.toggleOutputBox', 'Toggle displaying the output box'),
(c) => {
if (c.isOutputBoxShown()) {
c.hideOutputBox();
} else {
c.showOutputBox();
}
}
);

0 comments on commit 736a72a

Please sign in to comment.