diff --git a/src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.ts b/src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.ts index b41fed6978c..461fd507dbe 100644 --- a/src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.ts +++ b/src/vs/editor/browser/gpu/atlas/textureAtlasSlabAllocator.ts @@ -55,7 +55,7 @@ export class TextureAtlasSlabAllocator implements ITextureAtlasAllocator { })); this._slabW = Math.min( - options?.slabW ?? (64 << (Math.floor(getActiveWindow().devicePixelRatio) - 1)), + options?.slabW ?? (64 << Math.max(Math.floor(getActiveWindow().devicePixelRatio) - 1, 0)), this._canvas.width ); this._slabH = Math.min(