From aa14526cb3a1890e964ff3dfba6f0ae733da52b7 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 16 May 2017 20:17:14 +0200
Subject: [PATCH] tweaks: exclude from the tiny version five error-betraying
 messages

---
 src/nano.c  | 2 +-
 src/utils.c | 2 ++
 src/winio.c | 6 ++++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/nano.c b/src/nano.c
index 2a13e2da..28ec1e09 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -2007,7 +2007,7 @@ int main(int argc, char **argv)
     textdomain(PACKAGE);
 #endif
 
-#ifdef ENABLE_UTF8
+#if defined(ENABLE_UTF8) && !defined(NANO_TINY)
     if (MB_CUR_MAX > MAXCHARLEN)
 	fprintf(stderr, "Unexpected large character size: %i bytes"
 			" -- please report a bug\n", (int)MB_CUR_MAX);
diff --git a/src/utils.c b/src/utils.c
index 8fc6a1a0..8a5a1aac 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -237,7 +237,9 @@ const char *strstrwrapper(const char *haystack, const char *needle,
 	const char *start)
 {
     if (*needle == '\0') {
+#ifndef NANO_TINY
 	statusline(ALERT, "Searching for nothing -- please report a bug");
+#endif
 	return (char *)start;
     }
 
diff --git a/src/winio.c b/src/winio.c
index 9f431f95..89210301 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2687,8 +2687,10 @@ int update_line(filestruct *fileptr, size_t index)
 
     /* If the line is offscreen, don't even try to display it. */
     if (row < 0 || row >= editwinrows) {
+#ifndef NANO_TINY
 	statusline(ALERT, "Badness: tried to display a line on row %i"
 				" -- please report a bug", row);
+#endif
 	return 0;
     }
 
@@ -2903,12 +2905,16 @@ void edit_scroll(scroll_dir direction, int nrows)
 
     /* Don't bother scrolling zero rows, nor more than the window can hold. */
     if (nrows == 0) {
+#ifndef NANO_TINY
 	statusline(ALERT, "Underscrolling -- please report a bug");
+#endif
 	return;
     }
     if (nrows >= editwinrows) {
+#ifndef NANO_TINY
 	if (editwinrows > 1)
 	    statusline(ALERT, "Overscrolling -- please report a bug");
+#endif
 	refresh_needed = TRUE;
 	return;
     }
-- 
GitLab