mirror of
https://github.com/Microsoft/vscode
synced 2024-08-25 03:56:03 +00:00
parent
257e976bd4
commit
760080ab64
|
@ -30,6 +30,7 @@ export class TerminalEditorInput extends EditorInput {
|
|||
|
||||
private _isDetached = false;
|
||||
private _isShuttingDown = false;
|
||||
private _isReverted = false;
|
||||
private _copyInstance?: ITerminalInstance;
|
||||
private _terminalEditorFocusContextKey: IContextKey<boolean>;
|
||||
|
||||
|
@ -89,6 +90,9 @@ export class TerminalEditorInput extends EditorInput {
|
|||
}
|
||||
|
||||
override isDirty(): boolean {
|
||||
if (this._isReverted) {
|
||||
return false;
|
||||
}
|
||||
const confirmOnKill = this._configurationService.getValue<ConfirmOnKill>(TerminalSettingId.ConfirmOnKill);
|
||||
if (confirmOnKill === 'editor' || confirmOnKill === 'always') {
|
||||
return this._terminalInstance?.hasChildProcesses || false;
|
||||
|
@ -96,6 +100,11 @@ export class TerminalEditorInput extends EditorInput {
|
|||
return false;
|
||||
}
|
||||
|
||||
override async revert(): Promise<void> {
|
||||
// On revert just treat the terminal as permanently non-dirty
|
||||
this._isReverted = true;
|
||||
}
|
||||
|
||||
constructor(
|
||||
public readonly resource: URI,
|
||||
private _terminalInstance: ITerminalInstance | undefined,
|
||||
|
|
Loading…
Reference in a new issue