This commit is contained in:
meganrogge 2023-11-10 13:27:22 -08:00
parent 26b39c1f9e
commit 791e0882c1
No known key found for this signature in database
GPG key ID: AA74638D4878183D
3 changed files with 4 additions and 4 deletions

View file

@ -289,7 +289,7 @@ export interface ITerminalService extends ITerminalInstanceHost {
getReconnectedTerminals(reconnectionOwner: string): ITerminalInstance[] | undefined;
getActiveOrCreateInstance(options?: { acceptsInput?: boolean }): Promise<ITerminalInstance>;
revealActiveTerminal(): Promise<void>;
revealActiveTerminal(preserveFocus?: boolean): Promise<void>;
moveToEditor(source: ITerminalInstance): void;
moveToTerminalView(source: ITerminalInstance | URI): Promise<void>;
getPrimaryBackend(): ITerminalBackend | undefined;

View file

@ -609,7 +609,7 @@ export function registerTerminalActions() {
text = editor.getModel().getValueInRange(selection, endOfLinePreference);
}
instance.sendText(text, true, true);
await c.service.revealActiveTerminal();
await c.service.revealActiveTerminal(true);
}
});

View file

@ -554,13 +554,13 @@ export class TerminalService extends Disposable implements ITerminalService {
return instance;
}
async revealActiveTerminal(): Promise<void> {
async revealActiveTerminal(preserveFocus?: boolean): Promise<void> {
const instance = this.activeInstance;
if (!instance) {
return;
}
if (instance.target === TerminalLocation.Editor) {
await this._terminalEditorService.revealActiveEditor();
await this._terminalEditorService.revealActiveEditor(preserveFocus);
} else {
await this._terminalGroupService.showPanel();
}