nano

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

commit 7545eb5bbfc932e73f51f88b2107c8f14f087abd
parent 878bd53d11e546810838328c6d81c78b415d1672
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon,  1 Feb 2021 17:19:28 +0100

minibar: show the state flags only when --stateflags is used

For users who always have auto-indent or hardwrap or softwrap on
and do not need to see this continuously advertised at the bottom.

Diffstat:
Msrc/nano.c | 2+-
Msrc/winio.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -1112,7 +1112,7 @@ void do_toggle(int flag) if (flag == NO_HELP || flag == NO_SYNTAX) enabled = !enabled; - if (!ISSET(MINIBAR) || flag == SMART_HOME || flag == CUT_FROM_CURSOR || + if (!ISSET(MINIBAR) || !ISSET(STATEFLAGS) || flag == SMART_HOME || flag == CUT_FROM_CURSOR || flag == TABS_TO_SPACES || flag == USE_MOUSE || flag == SUSPENDABLE) statusline(REMARK, "%s %s", _(flagtostr(flag)), enabled ? _("enabled") : _("disabled")); diff --git a/src/winio.c b/src/winio.c @@ -2179,7 +2179,7 @@ void minibar(void) } /* Display the state of three flags, and the state of macro and mark. */ - if (!successor && namewidth + tallywidth + 14 + 2 * padding < COLS) { + if (ISSET(STATEFLAGS) && !successor && namewidth + tallywidth + 14 + 2 * padding < COLS) { wmove(bottomwin, 0, COLS - 11 - padding); show_states_at(bottomwin); }