Send a string to hide the latest line when scrolling. thx josuah - clic - Clic is an command line interactive client for gopher written in Common LISP
 (HTM) git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/clic/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 8605ef1699e170afed26d4266f2bf3db53225e73
 (DIR) parent 451e378cbe7ff338f129b24b8f9b476fcbf553d3
 (HTM) Author: Solene Rapenne <solene@perso.pw>
       Date:   Thu, 11 Jan 2018 19:35:44 +0000
       
       Send a string to hide the latest line when scrolling. thx josuah
       
       Diffstat:
         M clic.lisp                           |      12 +++++++-----
       
       1 file changed, 7 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/clic.lisp b/clic.lisp
       @@ -543,11 +543,13 @@
                                    (get-color 'reset))
                            (force-output)
                            (let ((first-input (read-char)))
       -                      (when (not (char= #\NewLine first-input))
       -                        (unread-char first-input)
       -                        (let ((input-text (format nil "~a" (read-line nil nil))))
       -                          (setf input input-text)
       -                          (loop-finish))))))
       +                      (if (char= #\NewLine first-input)
       +                          (format t "'~a[A~a[K" #\Escape #\Escape)
       +                        (progn
       +                          (unread-char first-input)
       +                          (let ((input-text (format nil "~a" (read-line nil nil))))
       +                            (setf input input-text)
       +                            (loop-finish)))))))
        
                     ;; in case of shell command, do it
                     (if input