From b5aa501bab1675221553780cd071b93eedb387f2 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 7 Mar 2019 17:32:39 +0100 Subject: [PATCH] Use 1e9 instead of 2e9 for big integers Several engines apparently store only 31 bits in smallints --- src/docview.ts | 2 +- src/viewport.ts | 4 ++-- test/test-heightmap.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/docview.ts b/src/docview.ts index 0a80e58e..6fb2947f 100644 --- a/src/docview.ts +++ b/src/docview.ts @@ -566,7 +566,7 @@ function extendWithRanges(diff: A, ranges: number[]): A { let block2 = map.blockAt(block1.bottom + 1, text, 0, 0) ist(block2.from, 4); ist(block2.to, 7) ist(block2.top, block1.bottom); ist(block2.bottom, block1.bottom, ">") - let block3 = map.blockAt(2e9, text, 0, 0) + let block3 = map.blockAt(1e9, text, 0, 0) ist(block3.from, 16); ist(block3.to, 19) ist(block3.bottom, map.height) }) @@ -259,7 +259,7 @@ describe("HeightMap", () => { let line3 = map.lineAt(15, byP, text, 0, 0) ist(line3.from, 12); ist(line3.to, 15) ist(line3.bottom, map.height) - ist(map.lineAt(2e9, byH, text, 0, 0), line3, eqBlock) + ist(map.lineAt(1e9, byH, text, 0, 0), line3, eqBlock) }) it("finds lines in lines", () => {