Recently Written · git

clic

MIRROR ONLY Gopher client with pretty colours in Common Lisp

git clone https://github.com/equwal/clic

Log | Files | Refs


commit f2fe151427976dd0fa6135c5d313333b31732a47
Quentin Rameau <quinq@fifth.space>
2017-12-14 12:17:14 +0100

Fix one off for command bar in lines counting

 clic.lisp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clic.lisp b/clic.lisp
index 4b33bc2..422afa4 100644
--- a/clic.lisp
+++ b/clic.lisp
@@ -374,7 +374,7 @@
 
 (defun display-buffer(type)
   "display the buffer"
-  (let ((rows (c-termsize)))
+  (let ((rows (- (c-termsize) 1))) ; -1 for command bar
 
     ;; we store the user input outside of the loop
     ;; so if the user doesn't want to scroll
@@ -391,7 +391,7 @@
 	      (format t "~a~%" line)))
 
 	   ;; split and ask to scroll or to type a command
-	   (when (= row rows) ; -1 for text displayed
+	   (when (= row rows)
 	     (setf row 0)
 	     (format t "~a   press enter or a shell command ~a : "
 		     (get-color 'cyan)