未验证 提交 41eb9e0c 编写于 作者: C Connor Peet

terminal: clear typeahead predictions on resize

Fixes https://github.com/microsoft/vscode/issues/109584
Fixes https://github.com/microsoft/vscode/issues/109588

Deactivates on resize and will reactivate on the debounce after 100ms
of no input.
上级 838eef73
......@@ -879,7 +879,11 @@ export class TypeAheadAddon extends Disposable implements ITerminalAddon {
timeline.setShowPredictions(this.typeaheadThreshold === 0);
this._register(terminal.onData(e => this.onUserData(e)));
this._register(terminal.onResize(() => timeline.clearCursor()));
this._register(terminal.onResize(() => {
timeline.setShowPredictions(false);
timeline.clearCursor();
this.reevaluatePredictorState(stats, timeline);
}));
this._register(this.config.onConfigChanged(() => {
this.typeheadStyle = parseTypeheadStyle(this.config.config.typeaheadStyle);
this.typeaheadThreshold = this.config.config.typeaheadThreshold;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册