From 5ae84fac6efe3c8abe72e0053045137492a8ad5a Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Thu, 13 Jan 2022 13:13:13 -0600 Subject: [PATCH] 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. Reference(s): . 12/30/20, newlib branch equivalent commit commit edce9ed61241146939473aaa80b7a469b7442cbf Signed-off-by: Jim Warner --- top/top.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/top/top.h b/top/top.h index 72ee8fe4..a267e52d 100644 --- a/top/top.h +++ b/top/top.h @@ -54,6 +54,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 */ @@ -482,7 +483,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