Fix #172604. GetWidth can be fast for long line onced rendered. (#172647)

This commit is contained in:
Peng Lyu 2023-01-27 13:53:24 -08:00 committed by GitHub
parent 4db912c6c1
commit b229eb5fa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -443,7 +443,7 @@ class FastRenderedViewLine implements IRenderedViewLine {
}
public getWidthIsFast(): boolean {
return (this.input.lineContent.length < Constants.MaxMonospaceDistance);
return (this.input.lineContent.length < Constants.MaxMonospaceDistance) || this._cachedWidth !== -1;
}
public monospaceAssumptionsAreValid(): boolean {