From d92142c66a7ab6571ff82195fe2f0983ce4b4e49 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 12 Jul 2018 20:44:36 +0200 Subject: [PATCH] easter: show the crawl only when there is room enough for the lines The crawl needs at least five rows to be perceived as a crawl, and the widest line is 31 characters (ignoring translations, which might be even longer). Formerly, when only two or three rows were available, nothing was shown at all, which was puzzling. So, better do the credits only when there is room enough for them, and print a message otherwise. --- src/files.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/files.c b/src/files.c index 1219d3f7..402d7a51 100644 --- a/src/files.c +++ b/src/files.c @@ -2169,8 +2169,11 @@ int do_writeout(bool exiting, bool withprompt) * egg. Display the credits. */ if (!did_credits && exiting && !ISSET(TEMP_FILE) && strcasecmp(answer, "zzy") == 0) { - do_credits(); - did_credits = TRUE; + if (LINES > 5 && COLS > 31) { + do_credits(); + did_credits = TRUE; + } else + statusbar(_("Screen is too small")); break; } #endif