fixes the way alt-enter in the drracket repl works so that it doesn't insert whitespace into the submitted expression

closes PR 11621
This commit is contained in:
Robby Findler 2011-01-15 16:01:20 -06:00
parent 6c974f6c5f
commit 7a85e942a2

View File

@ -2036,6 +2036,7 @@
(start . >= . unread-start-point)) (start . >= . unread-start-point))
(inner #t can-delete? start len))) (inner #t can-delete? start len)))
(inherit set-position)
(define/override (on-local-char key) (define/override (on-local-char key)
(let ([start (get-start-position)] (let ([start (get-start-position)]
[end (get-end-position)] [end (get-end-position)]
@ -2048,7 +2049,8 @@
[(and (insertion-point . <= . start) [(and (insertion-point . <= . start)
(= start end) (= start end)
(submit-to-port? key)) (submit-to-port? key))
(insert "\n") (insert "\n" (last-position) (last-position))
(set-position (last-position) (last-position))
(for-each/snips-chars (for-each/snips-chars
unread-start-point unread-start-point
(last-position) (last-position)