From cb89749b4a83e26ee011f31cd08bcb24dcf53a71 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 6 Jun 2000 23:15:56 +0000 Subject: [PATCH] . original commit: cb30a85ae567cd6abb3248b057bc7a73a012eb0f --- src/mred/wrap/mred.ss | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/mred/wrap/mred.ss b/src/mred/wrap/mred.ss index 5b7989b9..14a614b4 100644 --- a/src/mred/wrap/mred.ss +++ b/src/mred/wrap/mred.ss @@ -4332,21 +4332,22 @@ [else (void)]) (send edit paste)))] [mouse-popup-menu (lambda (edit event) - (let ([a (send edit get-admin)]) - (when a - (let ([m (make-object popup-menu%)]) - (append-editor-operation-menu-items m) - ;; Remove shortcut indicators (because they might not be correct) - (for-each - (lambda (i) - (when (is-a? i selectable-menu-item<%>) - (send i set-shortcut #f))) - (send m get-items)) - (let-values ([(x y) (send edit - dc-location-to-editor-location - (send event get-x) - (send event get-y))]) - (send a popup-menu m (+ x 5) (+ y 5)))))))]) + (when (send event button-up?) + (let ([a (send edit get-admin)]) + (when a + (let ([m (make-object popup-menu%)]) + (append-editor-operation-menu-items m) + ;; Remove shortcut indicators (because they might not be correct) + (for-each + (lambda (i) + (when (is-a? i selectable-menu-item<%>) + (send i set-shortcut #f))) + (send m get-items)) + (let-values ([(x y) (send edit + dc-location-to-editor-location + (send event get-x) + (send event get-y))]) + (send a popup-menu m (+ x 5) (+ y 5))))))))]) (wx:add-text-keymap-functions k) (send k add-function "mouse-paste" mouse-paste) (send k add-function "mouse-popup-menu" mouse-popup-menu) @@ -4360,7 +4361,7 @@ '(":middlebutton")) '("copy-clipboard" "cut-clipboard" "paste-clipboard" "delete-to-end-of-line" "undo" "select-all" "mouse-paste")) - (send k map-function ":rightbutton" "mouse-popup-menu") + (send k map-function ":rightbuttonseq" "mouse-popup-menu") (when (eq? (system-type) 'unix) (send k map-function ":c:a" "beginning-of-line") (send k map-function ":c:e" "end-of-line")))