From 399a024857a0d72a11dcfa747d6387d90698b97b Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 8 Feb 2021 10:18:22 +0100 Subject: [PATCH] minibar: suppress the toggling feedback for M-C, but show it for M-Y/M-P In addition, suppress the feedback for M-C also when --minibar isn't used, as the feedback obscures the effect of the toggle: showing information about the cursor position on the status bar. This fixes https://savannah.gnu.org/bugs/?60019. Bug existed since commit 7545eb5b from one week ago. --- src/nano.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nano.c b/src/nano.c index 98134bb2..d0c731e0 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1111,7 +1111,13 @@ void do_toggle(int flag) if (flag == NO_HELP || flag == NO_SYNTAX) enabled = !enabled; + if (flag == CONSTANT_SHOW) + wipe_statusbar(); + else if (ISSET(MINIBAR) && (flag == NO_HELP || flag == LINE_NUMBERS )) + ; + else if (!ISSET(MINIBAR) || !ISSET(STATEFLAGS) || flag == SMART_HOME || flag == CUT_FROM_CURSOR || + flag == NO_SYNTAX || flag == WHITESPACE_DISPLAY || flag == TABS_TO_SPACES || flag == USE_MOUSE || flag == SUSPENDABLE) statusline(REMARK, "%s %s", _(flagtostr(flag)), enabled ? _("enabled") : _("disabled"));