]> granicus.if.org Git - procps-ng/commitdiff
top: allow setting variable width col scroll (1 vs. 8)
authorJim Warner <james.warner@comcast.net>
Wed, 30 Dec 2020 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Sat, 2 Jan 2021 04:42:10 +0000 (15:42 +1100)
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 <james.warner@comcast.net>
top/top.h

index 673857ab85ab46690911c99c3788bd85da47d449..c5f42dc36cc0cc532e0c58db21e712e32b99be1e 100644 (file)
--- 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