fix wheel step in editor

svn: r15163
This commit is contained in:
Matthew Flatt 2009-06-13 13:26:52 +00:00
parent 1f7ea0f809
commit 3f1b1391b8

View File

@ -1,5 +1,6 @@
#lang scheme/base
(require scheme/class
scheme/file
"../syntax.ss"
"editor.ss"
"editor-admin.ss"
@ -128,7 +129,11 @@
;; ----------------------------------------
(define default-wheel-amt 3)
(define default-wheel-amt
(let ([v (get-preference 'MrEd:wheelStep)])
(if (exact-integer? v)
(max 3 (min 1000 v))
3)))
(define (INIT-SB style)
(append
@ -439,9 +444,10 @@
[y 0])
(get-scroll x y)
(let ([y (max (+ y
(* wheel-amt
(if (eq? code 'wheel-up)
-1
1))
1)))
0)])
(do-scroll x y #t))))]
[else