fix problem with keymap chaining and prefix bindings

svn: r14513

original commit: 0f9cb4882d787899b311ae82fd693042effeb52b
This commit is contained in:
Matthew Flatt 2009-04-14 16:38:37 +00:00
parent cbf7ba42d4
commit 28ba2e3e4a

View File

@ -473,12 +473,14 @@
(for/fold ([r 0])
([c (in-list chain-to)]
#:when (r . <= . 0))
(let ([r (send c chain-handle-key-event obj event grab try-prefixed? score)])
(if (r . > . 0)
(let ([r2 (send c chain-handle-key-event obj event grab try-prefixed? score)])
(if (r2 . > . 0)
(begin
(reset)
r)
r))))
r2)
(if (r2 . < . 0)
r2
r)))))
(define/public (chain-handle-key-event obj event grab only-prefixed? score)
;; results: 0 = no match, 1 = match, -1 = matched prefix