diff --git a/collects/framework/private/dir-chars.rkt b/collects/framework/private/dir-chars.rkt new file mode 100644 index 0000000000..2c75ae73fb --- /dev/null +++ b/collects/framework/private/dir-chars.rkt @@ -0,0 +1,39 @@ +#lang racket/base +(require racket/list) +(provide adjustable-chars + up-chars + dn-chars + lt-chars + rt-chars) + +(define up-chars + '(#\╬ + #\╩ #\╣ #\╠ + #\╝ #\╚ + #\║ + #\+ #\|)) + +(define dn-chars + '(#\╬ + #\╦ #\╣ #\╠ + #\╗ #\╔ + #\║ + #\+ #\|)) + +(define lt-chars + '(#\╬ + #\╩ #\╦ #\╣ + #\╝ #\╗ + #\═ + #\+ #\-)) + +(define rt-chars + '(#\╬ + #\╩ #\╦ #\╠ + #\╔ #\╚ + #\═ + #\+ #\-)) + +(define adjustable-chars + (remove-duplicates + (append up-chars dn-chars lt-chars rt-chars))) \ No newline at end of file diff --git a/collects/framework/private/keymap.rkt b/collects/framework/private/keymap.rkt index 8ebefc5457..582c2635b2 100644 --- a/collects/framework/private/keymap.rkt +++ b/collects/framework/private/keymap.rkt @@ -6,6 +6,7 @@ racket/list mred/mred-sig "../preferences.rkt" + "dir-chars.rkt" mrlib/tex-table (only-in srfi/13 string-prefix? string-prefix-length) "sig.rkt" @@ -1540,38 +1541,6 @@ (define start (send text paragraph-start-position para)) (values (- pos start) para)) -(define up-chars - '(#\╬ - #\╩ #\╣ #\╠ - #\╝ #\╚ - #\║ - #\+ #\|)) - -(define dn-chars - '(#\╬ - #\╦ #\╣ #\╠ - #\╗ #\╔ - #\║ - #\+ #\|)) - -(define lt-chars - '(#\╬ - #\╩ #\╦ #\╣ - #\╝ #\╗ - #\═ - #\+ #\-)) - -(define rt-chars - '(#\╬ - #\╩ #\╦ #\╠ - #\╔ #\╚ - #\═ - #\+ #\-)) - -(define adjustable-chars - (remove-duplicates - (append up-chars dn-chars lt-chars rt-chars))) - (define (xy->pos text x y) (cond