mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-21 03:36:14 +01:00
Merge pull request #60167 from Microsoft/tyriar/58357
Stabilize active terminal APIs
This commit is contained in:
Vendored
+13
@@ -5920,6 +5920,19 @@ declare module 'vscode' {
|
||||
*/
|
||||
export const terminals: ReadonlyArray<Terminal>;
|
||||
|
||||
/**
|
||||
* The currently active terminal or `undefined`. The active terminal is the one that
|
||||
* currently has focus or most recently had focus.
|
||||
*/
|
||||
export const activeTerminal: Terminal | undefined;
|
||||
|
||||
/**
|
||||
* An [event](#Event) which fires when the [active terminal](#window.activeTerminal)
|
||||
* has changed. *Note* that the event also fires when the active terminal changes
|
||||
* to `undefined`.
|
||||
*/
|
||||
export const onDidChangeActiveTerminal: Event<Terminal | undefined>;
|
||||
|
||||
/**
|
||||
* An [event](#Event) which fires when a terminal has been created, either through the
|
||||
* [createTerminal](#window.createTerminal) API or commands.
|
||||
|
||||
Vendored
-13
@@ -995,19 +995,6 @@ declare module 'vscode' {
|
||||
}
|
||||
|
||||
export namespace window {
|
||||
/**
|
||||
* The currently active terminal or `undefined`. The active terminal is the one that
|
||||
* currently has focus or most recently had focus.
|
||||
*/
|
||||
export const activeTerminal: Terminal | undefined;
|
||||
|
||||
/**
|
||||
* An [event](#Event) which fires when the [active terminal](#window.activeTerminal)
|
||||
* has changed. *Note* that the event also fires when the active terminal changes
|
||||
* to `undefined`.
|
||||
*/
|
||||
export const onDidChangeActiveTerminal: Event<Terminal | undefined>;
|
||||
|
||||
/**
|
||||
* Create a [TerminalRenderer](#TerminalRenderer).
|
||||
*
|
||||
|
||||
@@ -354,7 +354,7 @@ export function createApiFactory(
|
||||
return extHostEditors.getVisibleTextEditors();
|
||||
},
|
||||
get activeTerminal() {
|
||||
return proposedApiFunction(extension, extHostTerminalService.activeTerminal);
|
||||
return extHostTerminalService.activeTerminal;
|
||||
},
|
||||
get terminals() {
|
||||
return extHostTerminalService.terminals;
|
||||
@@ -397,9 +397,9 @@ export function createApiFactory(
|
||||
onDidOpenTerminal(listener, thisArg?, disposables?) {
|
||||
return extHostTerminalService.onDidOpenTerminal(listener, thisArg, disposables);
|
||||
},
|
||||
onDidChangeActiveTerminal: proposedApiFunction(extension, (listener, thisArg?, disposables?) => {
|
||||
onDidChangeActiveTerminal(listener, thisArg?, disposables?) {
|
||||
return extHostTerminalService.onDidChangeActiveTerminal(listener, thisArg, disposables);
|
||||
}),
|
||||
},
|
||||
get state() {
|
||||
return extHostWindow.state;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user