commit f5bc261944722d8b0938ace56287d8910895f40d
parent 8a304bdf7c37c04d47bd559ddce46fc334ddf883
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 20 Nov 2023 15:36:05 +0100
general: let the constant-show toggle override the zero-interface mode
When the user hits the M-C toggle while option --zero is in effect,
instead of complaining "Not possible", do what the user probably
tries to achieve: cancel `zero` mode and switch on `constantshow`.
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1086,9 +1086,12 @@ void toggle_this(int flag)
draw_all_subwindows();
break;
case CONSTANT_SHOW:
- if (ISSET(ZERO) || LINES == 1) {
- statusline(AHEM, _("Not possible"));
+ if (LINES == 1) {
+ statusline(AHEM, _("Too tiny"));
TOGGLE(flag);
+ } else if (ISSET(ZERO)) {
+ SET(CONSTANT_SHOW);
+ toggle_this(ZERO);
} else if (!ISSET(MINIBAR))
wipe_statusbar();
return;