提交 9ed0aa6c 编写于 作者: D Daniel Imms

Fix type ahead issue in relaunched terminals

Phantom characters were showing up because type ahead was installing a
second onBeforeProcessData listener. The root cause was a refactor to
move and encapsulate the relaunching logic/concept inside TerminalProcessManager.

Fixes #118804
Co-authored-by: NMegan Rogge <merogge@microsoft.com>
上级 7243e13d
......@@ -1167,7 +1167,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
this._processManager.relaunch(this._shellLaunchConfig, this._cols, this._rows, this._accessibilityService.isScreenReaderOptimized(), reset);
this._xtermTypeAhead?.reset(this._processManager);
this._xtermTypeAhead?.reset();
}
@debounce(1000)
......
......@@ -1330,10 +1330,8 @@ export class TypeAheadAddon extends Disposable implements ITerminalAddon {
}));
}
public reset(processManager: ITerminalProcessManager) {
public reset() {
this.lastRow = undefined;
this.processManager = processManager;
this._register(this.processManager.onBeforeProcessData(e => this.onBeforeProcessData(e)));
}
private deferClearingPredictions() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册