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 ()
|
(defun csi-handler ()
|
||||||
(loop :for buffer := '() :then (append buffer (list (read-char *eio*)))
|
(loop :for buffer := '() :then (append buffer (list (read-char *eio*)))
|
||||||
:for found := (assoc buffer *csi-sequences* :test #'equalp)
|
:for found := (assoc buffer *csi-sequences* :test #'equalp)
|
||||||
:when (or found (not (zerop (some
|
:for match-point := (some
|
||||||
(lambda (c)
|
(lambda (c)
|
||||||
(search buffer (car c)))
|
(search buffer (car c)))
|
||||||
*csi-sequences*))))
|
*csi-sequences*)
|
||||||
:return (cadr found)))
|
:when (or found (null match-point)
|
||||||
|
(and (numberp match-point)
|
||||||
|
(not (zerop match-point))))
|
||||||
|
:return (or (cadr found) :unknown)))
|
||||||
|
|
||||||
(defun esc (key)
|
(defun esc (key)
|
||||||
(when (numberp key)
|
(when (numberp key)
|
||||||
|
|
Loading…
Add table
Reference in a new issue