tweaks: make a misplaced call of statusline() more obvious by crashing
Also, reshuffle the lines, to take advantage of an other #ifndef.master
parent
312bcebf44
commit
7942dab014
12
src/winio.c
12
src/winio.c
|
@ -2043,6 +2043,9 @@ void statusline(message_type importance, const char *msg, ...)
|
|||
bool old_whitespace = ISSET(WHITESPACE_DISPLAY);
|
||||
|
||||
UNSET(WHITESPACE_DISPLAY);
|
||||
|
||||
if (isendwin())
|
||||
die("Out of curses -- please report a bug\n");
|
||||
#endif
|
||||
|
||||
/* Ignore a message with an importance that is lower than the last one. */
|
||||
|
@ -2050,15 +2053,6 @@ void statusline(message_type importance, const char *msg, ...)
|
|||
(lastmessage == MILD && importance == HUSH))
|
||||
return;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Curses mode shouldn't be off when trying to write to the status bar. */
|
||||
if (isendwin()) {
|
||||
fprintf(stderr, "Out of curses -- please report a bug\n");
|
||||
napms(1400);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If there are multiple alert messages, add trailing dots to the first. */
|
||||
if (lastmessage == ALERT) {
|
||||
if (start_col > 4) {
|
||||
|
|
Loading…
Reference in New Issue