[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stabilizing the output of --constantshow
From: |
Benno Schulenberg |
Subject: |
stabilizing the output of --constantshow |
Date: |
Fri, 12 Mar 2021 15:32:10 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Op 10-03-2021 om 17:10 schreef Mike Frysinger:
> i kind of wish it wasn't so jumpy, but i've gotten used to it. maybe:
>
> [ line %*i/%i (%2i%%),
> * the current line width should be the same as the max line width
> * the percentage should float between 2 & 3 cols rather than 1 & 2 & 3
>
> col %*i/%i (%3i%%),
> * the current col width should be the same as the max col width
> * it should always be at least 2
Indeed, always at least 2, because otherwise when passing over a blank
line it goes from "col 12/34" to "col 1/1" and the left and right still
jump one character inward.
> * the percentage should stay fixed at 3 cols since the cursor is frequently
> at the end col in the current line as one types
>
> char %*i,%i (%2i%%) ]
> * the current count width should be the same as the max count width
> * the percentage should float between 2 & 3 cols rather than 1 & 2 & 3
See attached patch for a first try. For the vast majority of files,
lines should be less than 100 columns wide, so I've simply used
"col %2zu/%2zu". When coming across wider lines, --constantshow
will still be jumpy, but... that could be a gentle encouragement
not to use such wide lines. :)
Other users of 'set constantshow', please try this patch and comment.
Benno
more-stabilized.patch
Description: Text Data
signature.asc
Description: OpenPGP digital signature