Skip to content

Commit 8109de9

Browse files
committed
guard against negative arguments to scroll-line-location
closes racket/drracket#627
1 parent ec5d8ce commit 8109de9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gui-lib/mred/private/wxme/text.rkt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@
12341234
(let* ([newtop (find-scroll-line (+ vy scroll-height))]
12351235
[y (scroll-line-location (+ newtop 1))]
12361236
[newtop (if (y . > . (+ vy scroll-height))
1237-
(sub1 newtop)
1237+
(max 0 (sub1 newtop))
12381238
newtop)]
12391239
[y (scroll-line-location newtop)])
12401240
;; y is the new top location

0 commit comments

Comments
 (0)