Add non split mode - 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 76ff5f0a91d9fbf3b2c0ef87d437c7243ecff59a
 (DIR) parent 4878ed433802ca7d743d3976987c94be4561b6a6
 (HTM) Author: Solene Rapenne <solene@perso.pw>
       Date:   Tue,  2 Apr 2019 15:13:16 +0200
       
       Add non split mode
       
       Diffstat:
         M README.md                           |       6 +++++-
         M clic.1                              |       6 +++++-
         M clic.lisp                           |      10 +++++++++-
       
       3 files changed, 19 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/README.md b/README.md
       @@ -72,7 +72,11 @@ permitting to use clic with the numpad with only one hand :
        Command line usage
        ==================
        
       -clic [-k] [url|file]
       +clic [-t] [-k] [url|file]
       +
       +If you start clic with -t parameter, then menus will be displayed in
       +one operation, instead of asking to display next page once it reach
       +your terminal size.
        
        If you start clic with -k parameter, then kiosk mode is enabled, which
        mean it won't call any external program or save any data on the
 (DIR) diff --git a/clic.1 b/clic.1
       @@ -6,7 +6,7 @@
        .Nd a text based gopher client
        .Sh SYNOPSIS
        .Nm clic
       -.Op Fl k
       +.Op Fl t k
        .Op URL
        .Sh DESCRIPTION
        .Nm
       @@ -22,6 +22,10 @@ will save it using its filename under
        .Sh OPTIONS
        .Bl -tag -width Ds
        .It Op Fl k
       +activate the non split mode.
       +This prevent clic to break menu display when the display reach the
       +terminal size. This is useful when you want to scroll using your terminal.
       +.It Op Fl k
        activate the kiosk mode. (Disable running external applications, temp files,
        downloading etc.)
        .It Op URL
 (DIR) diff --git a/clic.lisp b/clic.lisp
       @@ -46,6 +46,9 @@
        ;;;; kiosk mode 
        (defparameter *kiosk-mode* nil)
        
       +;;;; no split mode
       +(defparameter *no-split* nil)
       +
        (defmacro kiosk-mode(&body code)
          "prevent code if kiosk mode is enabled"
          `(progn
       @@ -435,6 +438,9 @@
                 (c-kiosk-pledge)
                 (setf *kiosk-mode* t))
        
       +        ((string= "-t" url)
       +         (setf *no-split* t))
       +
                ((= 0 (or (search "file://" url) 1))
                 (load-file-menu (subseq url 7))
                 (make-location :host 'local-file
       @@ -581,7 +587,9 @@
          ;; so if the user doesn't want to scroll
          ;; we break the loop and then execute the command
          (let ((input nil))
       -    (let ((rows (- (c-termsize) 1))) ; -1 for command bar
       +    (let ((rows (if *no-split*
       +                    -1
       +                    (* (- (c-termsize) 1))))) ; -1 for command bar
        
              (loop for line across *buffer*
                 counting line into row