fixed hash-bang bug

svn: r1016
This commit is contained in:
Robby Findler 2005-10-07 17:59:57 +00:00
parent 368b9d3382
commit a596d06517
2 changed files with 29 additions and 8 deletions

View File

@ -16,6 +16,7 @@ module browser threading seems wrong.
(lib "file.ss") (lib "file.ss")
(lib "etc.ss") (lib "etc.ss")
(lib "list.ss") (lib "list.ss")
(lib "port.ss")
(lib "string-constant.ss" "string-constants") (lib "string-constant.ss" "string-constants")
(lib "framework.ss" "framework") (lib "framework.ss" "framework")
(lib "name-message.ss" "mrlib") (lib "name-message.ss" "mrlib")
@ -1918,13 +1919,20 @@ module browser threading seems wrong.
(send definitions-text paragraph-start-position 1) (send definitions-text paragraph-start-position 1)
0)]) 0)])
(send definitions-text split-snip start) (send definitions-text split-snip start)
(let ([prt (open-input-text-editor definitions-text start)]) (let ([text-port (open-input-text-editor definitions-text start)])
(port-count-lines! prt) (port-count-lines! text-port)
(send interactions-text evaluate-from-port (let* ([line (send definitions-text position-paragraph start)]
prt [column (- start (send definitions-text paragraph-start-position line))]
#t [relocated-port (relocate-input-port text-port
(λ () (+ line 1)
(send interactions-text clear-undos))))))) column
(+ start 1))])
(port-count-lines! relocated-port)
(send interactions-text evaluate-from-port
relocated-port
#t
(λ ()
(send interactions-text clear-undos))))))))
(inherit revert save) (inherit revert save)
(define/private (check-if-save-file-up-to-date) (define/private (check-if-save-file-up-to-date)

View File

@ -266,6 +266,18 @@ There shouldn't be any error (but add in a bug that triggers one to be sure!)
#f #f
void void
void) void)
(make-test "#!/bin/sh\nxx"
"reference to undefined identifier: xx"
"reference to undefined identifier: xx"
#t
(cons (make-loc 1 0 10) (make-loc 1 2 12))
#f
#f
#f
void
void)
#| #|
(make-test (list "#!\n" (make-test (list "#!\n"
'("Special" "Insert XML Box") '("Special" "Insert XML Box")
@ -341,6 +353,7 @@ There shouldn't be any error (but add in a bug that triggers one to be sure!)
|# |#
;; eval tests ;; eval tests
(make-test " (eval '(values 1 2))" (make-test " (eval '(values 1 2))"
"1\n2" "1\n2"
"1\n2" "1\n2"
@ -1032,6 +1045,6 @@ There shouldn't be any error (but add in a bug that triggers one to be sure!)
;(set-language-level! (list "PLT" "Graphical (MrEd)")) (kill-tests) ;(set-language-level! (list "PLT" "Graphical (MrEd)")) (kill-tests)
(run-test-in-language-level #t)
(run-test-in-language-level #f) (run-test-in-language-level #f)
(run-test-in-language-level #t)
)) ))