fix(protocol): Skip leading whitespace in read-framed-message to prevent desync
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
This commit is contained in:
23
test-events.lisp
Normal file
23
test-events.lisp
Normal file
@@ -0,0 +1,23 @@
|
||||
(require :asdf)
|
||||
(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))
|
||||
(ql:quickload :croatoan)
|
||||
(in-package :cl-user)
|
||||
(defun main ()
|
||||
(with-open-file (f "event2.log" :direction :output :if-exists :supersede)
|
||||
(croatoan:with-screen (scr :input-echoing nil :input-blocking nil)
|
||||
(let* ((h (croatoan:height scr))
|
||||
(w (croatoan:width scr))
|
||||
(input-win (make-instance 'croatoan:window :height 1 :width w :position (list (- h 1) 0))))
|
||||
(setf (croatoan:function-keys-enabled-p input-win) t)
|
||||
(setf (croatoan:input-blocking input-win) nil)
|
||||
(loop
|
||||
(let* ((event (croatoan:get-wide-event input-win))
|
||||
(ch (and event (typep event 'croatoan:event) (croatoan:event-key event))))
|
||||
(when ch
|
||||
(format f "Got: ~S (type: ~S)~%" ch (type-of ch))
|
||||
(finish-output f)
|
||||
(when (or (eq ch #\q) (eq ch :q))
|
||||
(return))))
|
||||
(sleep 0.05))))))
|
||||
(main)
|
||||
(sb-ext:exit)
|
||||
Reference in New Issue
Block a user