Skip to content

Commit 449eab8

Browse files
sedwards2009marijnh
authored andcommitted
Make line height calculations more tolerant of browser rounding errors
1 parent f1319c8 commit 449eab8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/display/update_lines.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function updateHeightsInViewport(cm) {
2121
}
2222
let diff = cur.line.height - height
2323
if (height < 2) height = textHeight(display)
24-
if (diff > .001 || diff < -.001) {
24+
if (diff > .005 || diff < -.005) {
2525
updateLineHeight(cur.line, height)
2626
updateWidgetHeight(cur.line)
2727
if (cur.rest) for (let j = 0; j < cur.rest.length; j++)

0 commit comments

Comments
 (0)