From 6ed4157c51201cfea4e9fb4c63e64c44f89ac562 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 21 May 2015 08:51:15 -0600 Subject: [PATCH] fix boundary case for responding to horizontal scroll request --- gui-lib/mred/private/wxme/editor-canvas.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui-lib/mred/private/wxme/editor-canvas.rkt b/gui-lib/mred/private/wxme/editor-canvas.rkt index a5b3eb1a..f05a6e8d 100644 --- a/gui-lib/mred/private/wxme/editor-canvas.rkt +++ b/gui-lib/mred/private/wxme/editor-canvas.rkt @@ -732,11 +732,11 @@ (if (positive? hpixels-per-scroll) (cond [(or (and (eq? bias 'start) (fw . > . iw)) - (and (fw . < . iw) (localx . < . x)) + (and (fw . <= . iw) (localx . < . x)) (and (fw . > . iw) (not (eq? bias 'end)) (localx . < . x))) (->long (/ localx hpixels-per-scroll))] [(or (and (eq? bias 'end) (fw . > . iw)) - (and (fw . < . iw) ((+ x iw) . < . (+ localx fw))) + (and (fw . <= . iw) ((+ x iw) . < . (+ localx fw))) (and (fw . > . iw) (not (eq? bias 'start)) ((+ localx fw) . > . (+ x iw)))) (+ (->long (/ (+ localx (- fw iw)) hpixels-per-scroll)) 1)] [else cx])