From f42821293e47a8c28ea0d26faf8e96913d8669d0 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 9 Nov 2021 12:11:40 +0100 Subject: [PATCH] feedback: refuse the --constantshow toggle (M-C) on a one-row terminal When the terminal has just one row, there is no room to constantly show the position of the cursor, so do not allow the user to switch it on. This fixes https://savannah.gnu.org/bugs/?61445. Bug existed since version 5.8, commit 36ffb5f0. --- src/nano.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nano.c b/src/nano.c index 7f17f3c4..c2588d57 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1113,7 +1113,7 @@ void toggle_this(int flag) return; if (flag == CONSTANT_SHOW) { - if (ISSET(ZERO)) { + if (ISSET(ZERO) || LINES == 1) { statusline(AHEM, _("Not possible in barless mode")); TOGGLE(flag); } else if (!ISSET(MINIBAR))