File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
drracket-core-lib/drracket/private/syncheck Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2184,8 +2184,17 @@ If the namespace does not, they are colored the unbound color.
21842184 var-arrow-end-x-min
21852185 var-arrow-end-x-max)
21862186 (define base-%age
2187- (/ (- end-x var-arrow-end-x-min)
2188- (- var-arrow-end-x-max var-arrow-end-x-min)))
2187+ (cond
2188+ ;; it can be that we have only a single arrow
2189+ ;; and they might be directly above each other,
2190+ ;; which will end up with var-arrow-end-x-max and
2191+ ;; var-arrow-end-x-min equal to each other; in
2192+ ;; that case we want a straight up/down arrow
2193+ ;; (instead of the nan from the arithmetic below)
2194+ [(= var-arrow-end-x-max var-arrow-end-x-min) 0 ]
2195+ [else
2196+ (/ (- end-x var-arrow-end-x-min)
2197+ (- var-arrow-end-x-max var-arrow-end-x-min))]))
21892198 (if (< (var-arrow-start-pos-left arrow)
21902199 (var-arrow-end-pos-left arrow))
21912200 base-%age
You can’t perform that action at this time.
0 commit comments