From 07f7f5777c684214a3d2d5a6c3911504418ce73b Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Mon, 23 Jun 2008 18:22:03 +0000 Subject: [PATCH] Generalized click-forwarding-editor to work on text%s as well as pasteboards% svn: r10427 original commit: 9431017d1882d4e9b9d20e3ab4a281957afa627f --- collects/mrlib/click-forwarding-editor.ss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/mrlib/click-forwarding-editor.ss b/collects/mrlib/click-forwarding-editor.ss index 5e9afe50..5b7a6538 100644 --- a/collects/mrlib/click-forwarding-editor.ss +++ b/collects/mrlib/click-forwarding-editor.ss @@ -45,7 +45,12 @@ (let ([new-x (box x)] [new-y (box y)]) (global-to-local new-x new-y) - (find-snip (unbox new-x) (unbox new-y)))) + (cond + [(is-a? this text%) + (let ([pos (send this find-position (unbox new-x) (unbox new-y))]) + (find-snip pos 'after-or-none))] + [(is-a? this pasteboard%) + (find-snip (unbox new-x) (unbox new-y))]))) (super-instantiate ()) ))