another close-paren insertion repair

(this one causes runtime errors, not
bad behavior)
This commit is contained in:
Robby Findler 2013-02-02 09:09:36 -06:00
parent 4c98570fb6
commit 8aa3e1d473
2 changed files with 7 additions and 1 deletions

View File

@ -1078,7 +1078,7 @@ added get-regions
[(memq token '(string comment error)) #f]
[(or (= a pos) (= b pos))
(define raw-bcs (backward-containing-sexp pos 0))
(define bcs (skip-whitespace raw-bcs 'backward #t))
(define bcs (and raw-bcs (skip-whitespace raw-bcs 'backward #t)))
(cond
[(and bcs (> bcs 0))
(define a (assoc (string->symbol (string (get-character (- bcs 1))))

View File

@ -342,6 +342,12 @@
'(["[()\")" "" "\""]
["[()\")" "" "\""]))
(test-parens-behavior/full 'close-adjusts-properly-when-no-containing-sexp
")" "" ""
#\]
'([")]" "" ""]
[")]" "" ""]))
#| for these, the key-event with meta-down doesn't seem to work... maybe a Mac OS
issue; and may cause problems with these tests on another platform? .nah. |#
(when (equal? 'macosx (system-type))