Take rubout and backspace to be the same thing.
This commit is contained in:
parent
6a4ff24f90
commit
e0cb011ff4
|
@ -22,9 +22,10 @@
|
||||||
|
|
||||||
(define (update-buffer b key prompt k-eof k-complete k-ongoing)
|
(define (update-buffer b key prompt k-eof k-complete k-ongoing)
|
||||||
(case key
|
(case key
|
||||||
((#\backspace) (if (buffer-empty? b)
|
((#\backspace #\rubout) ;; backspace = ^H = code 8; delete = code 127
|
||||||
(k-ongoing b "")
|
(if (buffer-empty? b)
|
||||||
(k-ongoing (buffer-adjust b (cdr (buffer-chars b))) "\b \b")))
|
(k-ongoing b "")
|
||||||
|
(k-ongoing (buffer-adjust b (cdr (buffer-chars b))) "\b \b")))
|
||||||
((#\return) (k-complete (buffer-contents b) (buffer '() #t)))
|
((#\return) (k-complete (buffer-contents b) (buffer '() #t)))
|
||||||
((#\newline) (if (buffer-consume-next-linefeed? b)
|
((#\newline) (if (buffer-consume-next-linefeed? b)
|
||||||
(k-ongoing (struct-copy buffer b [consume-next-linefeed? #f]) "")
|
(k-ongoing (struct-copy buffer b [consume-next-linefeed? #f]) "")
|
||||||
|
|
Loading…
Reference in New Issue