Fix bug in editor's CSI dispatch causing errors on some unknown keys
This commit is contained in:
parent
c75698541a
commit
0da45020db
1 changed files with 8 additions and 5 deletions
|
@ -808,11 +808,14 @@ Additionally ensures correct line numbers on the way, as a bonus."
|
|||
(defun csi-handler ()
|
||||
(loop :for buffer := '() :then (append buffer (list (read-char *eio*)))
|
||||
:for found := (assoc buffer *csi-sequences* :test #'equalp)
|
||||
:when (or found (not (zerop (some
|
||||
(lambda (c)
|
||||
(search buffer (car c)))
|
||||
*csi-sequences*))))
|
||||
:return (cadr found)))
|
||||
:for match-point := (some
|
||||
(lambda (c)
|
||||
(search buffer (car c)))
|
||||
*csi-sequences*)
|
||||
:when (or found (null match-point)
|
||||
(and (numberp match-point)
|
||||
(not (zerop match-point))))
|
||||
:return (or (cadr found) :unknown)))
|
||||
|
||||
(defun esc (key)
|
||||
(when (numberp key)
|
||||
|
|
Loading…
Add table
Reference in a new issue