Send a string to hide the latest line when scrolling. thx josuah - clic - Clic … | |
git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit 8605ef1699e170afed26d4266f2bf3db53225e73 | |
parent 451e378cbe7ff338f129b24b8f9b476fcbf553d3 | |
Author: Solene Rapenne <[email protected]> | |
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(-) | |
--- | |
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 ni… | |
+ (setf input input-text) | |
+ (loop-finish))))))) | |
;; in case of shell command, do it | |
(if input |