Skip to content

Commit 3d3898f

Browse files
committed
Fix another copy-paste mistake in calculateScrollPos
Issue #2819
1 parent 29fbbac commit 3d3898f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3770,7 +3770,7 @@
37703770
var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;
37713771
var screenw = display.scroller.clientWidth - scrollerCutOff - display.gutters.offsetWidth;
37723772
var tooWide = x2 - x1 > screenw;
3773-
if (tooWide) x2 = x1 + screen;
3773+
if (tooWide) x2 = x1 + screenw;
37743774
if (x1 < 10)
37753775
result.scrollLeft = 0;
37763776
else if (x1 < screenleft)

0 commit comments

Comments
 (0)