nano

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

commit aa14526cb3a1890e964ff3dfba6f0ae733da52b7
parent d29d49aece521e919ab90061c6375170c941a9d9
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue, 16 May 2017 20:17:14 +0200

tweaks: exclude from the tiny version five error-betraying messages

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

diff --git 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 @@ -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 @@ -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; }