diff options
author | pgen <p.gen.progs@gmail.com> | 2023-05-26 00:31:12 +0200 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2023-05-26 00:31:12 +0200 |
commit | c83c3f06f1f98017f166e19a4f7078148d5b2941 (patch) | |
tree | 0ba1443e959364c82775d122d17c399b9aae239e | |
parent | 91be7e9f234b45d6ee3bcfc3fa474695bf5aa6dc (diff) |
Always pad non numbered words in col/line/tab_mode
-rw-r--r-- | smenu.1 | 3 | ||||
-rw-r--r-- | smenu.c | 6 | ||||
-rw-r--r-- | tests/direct_access/t0020.good | 16 |
3 files changed, 17 insertions, 8 deletions
@@ -1302,6 +1302,9 @@ The keyword '\f(CBincluded\fP' means that only \fIincluded\fP word will be padded while '\f(CBall\fP' means pad \fIall\fP words. The default is \f(CBall\fP. These keywords can be abbreviated. + +\fBWARNING\fP: in column/line/tab mode this sub-option is ignored and +non numbered words are always padded. . .TP \f(CBw\fP (\fB-F\fP|\fB-en\fP|\fB-embedded_number\fP, \ @@ -8522,6 +8522,12 @@ main(int argc, char * argv[]) if (win.tab_mode && !win.max_cols) win.wide = 1; + /* Force the padding mode to all when words are numbered and not in */ + /* col/line/tab_mode. */ + /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ + if (daccess.padding != 'a' && (win.col_mode || win.line_mode || win.tab_mode)) + daccess.padding = 'a'; + win.start = 0; term.color_method = ANSI; /* We default to setaf/setbf to set colors. */ diff --git a/tests/direct_access/t0020.good b/tests/direct_access/t0020.good index 7656a90..396c329 100644 --- a/tests/direct_access/t0020.good +++ b/tests/direct_access/t0020.good @@ -1,13 +1,13 @@ $ OUT=$(smenu -l -N -D p:i l:\( -e a t0020.in) -a (1) b -0:24 2:01 3:01 4:01 6:07 -(2) c a -0:01 1:01 2:01 6:24 -aa (3) bb -0:24 1:24 3:01 4:01 5:01 -(4) cc a -0:01 1:01 2:01 7:24 + a (1) b +4:24 6:01 7:01 8:01 10:07 +(2) c a +0:01 1:01 2:01 10:24 + aa (3) bb +4:24 5:24 7:01 8:01 9:01 +(4) cc a +0:01 1:01 2:01 11:24 $ $ echo ":$OUT:" |