commit f42821293e47a8c28ea0d26faf8e96913d8669d0
parent 0363703073afe35579476e5dc8d3e3df5d7735de
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 9 Nov 2021 12:11:40 +0100
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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))