mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
reveal active editor / show panel when appropriate (#158802)
This commit is contained in:
parent
dcf0c0a141
commit
bd6107301d
|
@ -545,6 +545,7 @@ export function registerTerminalActions() {
|
|||
const terminalService = accessor.get(ITerminalService);
|
||||
const terminalGroupService = accessor.get(ITerminalGroupService);
|
||||
const codeEditorService = accessor.get(ICodeEditorService);
|
||||
const terminalEditorService = accessor.get(ITerminalEditorService);
|
||||
|
||||
const instance = await terminalService.getActiveOrCreateInstance();
|
||||
const editor = codeEditorService.getActiveCodeEditor();
|
||||
|
@ -560,7 +561,11 @@ export function registerTerminalActions() {
|
|||
text = editor.getModel().getValueInRange(selection, endOfLinePreference);
|
||||
}
|
||||
instance.sendText(text, true);
|
||||
return terminalGroupService.showPanel();
|
||||
if (instance.target === TerminalLocation.Editor) {
|
||||
terminalEditorService.revealActiveEditor();
|
||||
} else {
|
||||
terminalGroupService.showPanel();
|
||||
}
|
||||
}
|
||||
});
|
||||
registerAction2(class extends Action2 {
|
||||
|
|
Loading…
Reference in a new issue