parent
68ebb25638
commit
1270874649
|
@ -1095,6 +1095,11 @@ export interface IXtermTerminal extends IDisposable {
|
|||
*/
|
||||
readonly isGpuAccelerated: boolean;
|
||||
|
||||
/**
|
||||
* The last `onData` input event fired by {@link RawXtermTerminal.onData}.
|
||||
*/
|
||||
readonly lastInputEvent: string | undefined;
|
||||
|
||||
/**
|
||||
* Attached the terminal to the given element
|
||||
* @param container Container the terminal will be rendered in
|
||||
|
|
|
@ -1598,7 +1598,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
|||
} else {
|
||||
if (exitMessage) {
|
||||
const failedDuringLaunch = this._processManager.processState === ProcessState.KilledDuringLaunch;
|
||||
if (failedDuringLaunch || this._terminalConfigurationService.config.showExitAlert) {
|
||||
if (failedDuringLaunch || (this._terminalConfigurationService.config.showExitAlert && this.xterm?.lastInputEvent !== /*Ctrl+D*/'\x04')) {
|
||||
// Always show launch failures
|
||||
this._notificationService.notify({
|
||||
message: exitMessage,
|
||||
|
|
|
@ -96,6 +96,8 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach
|
|||
private static _suggestedRendererType: 'dom' | undefined = undefined;
|
||||
private _attached?: { container: HTMLElement; options: IXtermAttachToElementOptions };
|
||||
private _isPhysicalMouseWheel = MouseWheelClassifier.INSTANCE.isPhysicalMouseWheel();
|
||||
private _lastInputEvent: string | undefined;
|
||||
get lastInputEvent(): string | undefined { return this._lastInputEvent; }
|
||||
|
||||
// Always on addons
|
||||
private _markNavigationAddon: MarkNavigationAddon;
|
||||
|
@ -256,6 +258,7 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach
|
|||
this._anyFocusedTerminalHasSelection.set(this.raw.hasSelection());
|
||||
}
|
||||
}));
|
||||
this._register(this.raw.onData(e => this._lastInputEvent = e));
|
||||
|
||||
// Load addons
|
||||
this._updateUnicodeVersion();
|
||||
|
|
Loading…
Reference in New Issue