diff --git a/wip-duuqnd/editor/editor.lisp b/wip-duuqnd/editor/editor.lisp index 450ee12..58b65b4 100644 --- a/wip-duuqnd/editor/editor.lisp +++ b/wip-duuqnd/editor/editor.lisp @@ -145,6 +145,18 @@ serial connection the editor normally runs under.") (write-char #\K *eio*) (force-output *eio*)) +(defun set-scrolling-region (&optional top bottom) + (assert (or (and (typep top 'integer) (typep bottom 'integer)) + (and (null top) (null bottom)))) + (cond ((and top bottom) + ;; Set the region + (write-byte #x1B *eio*) + (format *eio* "[~D;~Dr" top bottom)) + (t + ;; Reset the region to fullscreen + (write-byte #x1B *eio*) + (format *eio* "[1;24r")))) + (defun scroll-screen-down (&optional (amount 1)) (write-byte #x1B *eio*) (write-char #\[ *eio*) @@ -165,6 +177,14 @@ serial connection the editor normally runs under.") (write-byte #x1B *eio*) (write-string "[?25h" *eio*)) +(defun invert-text () + (write-byte #x1B *eio*) + (write-string "[7m" *eio*)) + +(defun reset-text-attributes () + (write-byte #x1B *eio*) + (write-string "[m" *eio*)) + (defparameter +screen-width+ 80)