commit e44d7e9bf83b9f4f33612a9aa178cb05625c41a4 Solene Rapenne <solene@perso.pw> 2018-01-12 09:39:09 +0100 scroll with carriage return and back to $PAGER
clic.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clic.lisp b/clic.lisp index 862f9c2..59cc1fe 100644 --- a/clic.lisp +++ b/clic.lisp @@ -493,7 +493,7 @@ (loop for line across *buffer* do (format output "~a~%" line))) - (uiop:run-program (list (or (uiop:getenv "EDITOR") "less") path) + (uiop:run-program (list (or (uiop:getenv "PAGER") "less") path) :input :interactive :output :interactive)) ;; display last menu @@ -549,7 +549,7 @@ (force-output) (let ((first-input (read-char))) (if (char= #\NewLine first-input) - (format t "'~a[A~a[K" #\Escape #\Escape) + (format t "'~C[A~C[K~C" #\Escape #\Escape #\return) (progn (unread-char first-input) (let ((input-text (format nil "~a" (read-line nil nil))))