mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 18:48:00 +00:00
fix #179981
This commit is contained in:
parent
26b39c1f9e
commit
791e0882c1
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue