Skip to content

Commit b229eb5

Browse files
authored
Fix microsoft#172604. GetWidth can be fast for long line onced rendered. (microsoft#172647)
1 parent 4db912c commit b229eb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/editor/browser/viewParts/lines/viewLine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ class FastRenderedViewLine implements IRenderedViewLine {
443443
}
444444

445445
public getWidthIsFast(): boolean {
446-
return (this.input.lineContent.length < Constants.MaxMonospaceDistance);
446+
return (this.input.lineContent.length < Constants.MaxMonospaceDistance) || this._cachedWidth !== -1;
447447
}
448448

449449
public monospaceAssumptionsAreValid(): boolean {

0 commit comments

Comments
 (0)