From: Jim Warner Date: Wed, 30 Dec 2020 06:00:00 +0000 (-0600) Subject: top: allow setting variable width col scroll (1 vs. 8) X-Git-Tag: v4.0.0~257 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=edce9ed61241146939473aaa80b7a469b7442cbf;p=procps-ng top: allow setting variable width col scroll (1 vs. 8) The Inspection feature already offered an INSP_SLIDE_1 provision. This patch now offers similar extensions to variable width column scrolling (assuming SCROLLVAR_NO isn't defined). Such a provision was useful during the development of some recent library UTF-8 enhancements. Signed-off-by: Jim Warner --- diff --git a/top/top.h b/top/top.h index 673857ab..c5f42dc3 100644 --- a/top/top.h +++ b/top/top.h @@ -45,6 +45,7 @@ //#define RECALL_FIXED /* don't reorder saved strings if recalled */ //#define RMAN_IGNORED /* don't consider auto right margin glitch */ //#define SCROLLVAR_NO /* disable intra-column horizontal scroll */ +//#define SCROLLV_BY_1 /* when scrolling left/right don't move 8 */ //#define STRINGCASENO /* case insenstive compare/locate versions */ //#define TERMIOS_ONLY /* just limp along with native input only */ //#define TOG4_NOFORCE /* no force 2 abreast mode with '4' toggle */ @@ -392,7 +393,11 @@ typedef struct WIN_t { (3 == w->maxpflgs && EU_XON == w->procflgs[0] && VARcol(w->procflgs[1]))) #endif #define VARleft(w) (w->varcolbeg && VARright(w)) +#ifdef SCROLLV_BY_1 +#define SCROLLAMT 1 +#else #define SCROLLAMT 8 +#endif #endif // Support for a proper (visible) row #1 whenever Curwin changes