terminal: fix typeahead edge case

Fixes #110042
This commit is contained in:
Connor Peet
2020-11-10 09:51:38 -08:00
parent fcfc8531aa
commit 5184dff52f

View File

@@ -1362,7 +1362,7 @@ export class TypeAheadAddon extends Disposable implements ITerminalAddon {
if (reader.eatCharCode(32, 126)) { // alphanum
const char = data[reader.index - 1];
if (this.timeline.addPrediction(buffer, new CharacterPrediction(this.typeaheadStyle!, char)) && this.timeline.getCursor(buffer).x === terminal.cols) {
if (this.timeline.addPrediction(buffer, new CharacterPrediction(this.typeaheadStyle!, char)) && this.timeline.getCursor(buffer).x >= terminal.cols) {
this.timeline.addBoundary(buffer, new TentativeBoundary(new LinewrapPrediction()));
}
continue;