critical fixes: schedule-event, :fiveam deps, syntax-highlighters, draw-rect frame sig

This commit is contained in:
Hermes
2026-05-11 23:03:52 +00:00
parent ad34ec1b63
commit 448127c696
7 changed files with 11 additions and 18 deletions

View File

@@ -114,13 +114,10 @@
(draw-rect screen x 0 max-w 1 :bg color)
(draw-text screen (1+ x) 0 text :white color :bold t)))
(defun toast (message &key (variant :info) (duration 5000))
(defun toast (message &key (variant :info) (duration 0))
(let ((toast (make-instance 'toast :message message :variant variant)))
(push toast *toasts*)
(when (plusp duration)
(schedule-event (+ (get-internal-real-time)
(* duration 1000))
(lambda () (dismiss-toast toast))))
(when (plusp duration) (dismiss-toast toast))
toast))
(defun dismiss-toast (toast)

View File

@@ -5,7 +5,7 @@
(:export
#:make-md-node #:md-node-p #:md-node-text
#:parse-blocks #:parse-inline
#:*syntax-highlighters* #:highlight-code
#:highlight-code
#:classify-diff-line #:render-md #:render-md-node
#:render-markdown #:render-inline
#:apply-style #:apply-styles))

View File

@@ -86,11 +86,10 @@
:bold bold :italic italic :underline underline
:link-url link-url)))
(defmethod draw-rect ((fb framebuffer-backend) x y w h &key fg bg style)
(declare (ignore style))
(defmethod draw-rect ((fb framebuffer-backend) x y w h &key bg)
(dotimes (row h)
(dotimes (col w)
(%set-cell fb (+ x col) (+ y row) #\space :fg fg :bg bg))))
(%set-cell fb (+ x col) (+ y row) #\space :fg nil :bg bg))))
(defmethod draw-border ((fb framebuffer-backend) x y w h &key (style :single) title title-align fg bg)
(let* ((chars (case style