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

master
Benno Schulenberg 2017-05-16 20:17:14 +02:00
parent d29d49aece
commit aa14526cb3
3 changed files with 9 additions and 1 deletions

View File

@ -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);

View File

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

View File

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