nano

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

commit eb3cc3a32d5f129a9ef89177b0af181645956c3a
parent 02df950240356a389941a7595503fb48f839202c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon,  3 May 2021 15:47:37 +0200

minibar: stay out of sight when the terminal has just one row

When there is just one row, the user wants to see text on this row,
not a bar with some meta info.

This fixes https://savannah.gnu.org/bugs/?60508.

Bug existed since version 5.5, since the minibar was introduced
with commit d31cc373.

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

diff --git a/src/files.c b/src/files.c @@ -2004,7 +2004,7 @@ bool write_file(const char *name, FILE *thefile, bool tmp, } #ifndef NANO_TINY - if (ISSET(MINIBAR) && fullbuffer && !tmp) + if (ISSET(MINIBAR) && LINES > 1 && fullbuffer && !tmp) report_size = TRUE; else #endif diff --git a/src/nano.c b/src/nano.c @@ -2501,7 +2501,7 @@ int main(int argc, char **argv) bottombars(MMAIN); #ifndef NANO_TINY - if (ISSET(MINIBAR) && lastmessage < REMARK) + if (ISSET(MINIBAR) && LINES > 1 && lastmessage < REMARK) minibar(); else #endif diff --git a/src/winio.c b/src/winio.c @@ -189,7 +189,7 @@ void read_keys_from(WINDOW *win) curs_set(1); #ifndef NANO_TINY - if (currmenu == MMAIN && ISSET(MINIBAR) && lastmessage > HUSH && + if (currmenu == MMAIN && ISSET(MINIBAR) && LINES > 1 && lastmessage > HUSH && lastmessage != INFO && lastmessage < ALERT) { timed = TRUE; halfdelay(ISSET(QUICK_BLANK) ? 8 : 15);