nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 45efe28f05461f1e4ce58e913b6e29a3f94aacc3
parent c8c7986f655811f5a8e492cd718bf5fba8b4e5f4
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 30 Dec 2020 19:01:35 +0100

minibar: drop the side spaces before suppressing the state flags

Also, consistently keep the right-side elements at least two spaces
away from the modification asterisk.

Diffstat:
Msrc/winio.c | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -2092,7 +2092,8 @@ void minibar(void) placewidth = strlen(location); namewidth = breadth(thename); - if (COLS < 12 || namewidth > COLS - 11) + /* If the file name is relatively long, drop the side spaces. */ + if (namewidth + 19 > COLS) padding = 0; if (COLS > 4) { @@ -2133,7 +2134,7 @@ void minibar(void) mvwaddstr(bottomwin, 0, COLS - 27 - placewidth, location); /* Display the hexadecimal code of the character under the cursor. */ - if (namewidth + tallywidth + 27 < COLS) { + if (namewidth + tallywidth + 28 < COLS) { char *thisline = openfile->current->data; if (thisline[openfile->current_x] == '\0') @@ -2150,8 +2151,8 @@ void minibar(void) } /* Display the state of three flags, and the state of macro and mark. */ - if (namewidth + tallywidth + 18 < COLS) { - wmove(bottomwin, 0, COLS - 13); + if (namewidth + tallywidth + 14 + 2 * padding < COLS) { + wmove(bottomwin, 0, COLS - 11 - padding); show_states_at(bottomwin); }