tweaks: reshuffle a fragment of code, to prepare for the next change

This commit is contained in:
Benno Schulenberg 2021-07-14 10:08:32 +02:00
parent c84a769733
commit 5954eeaff2

View File

@ -2264,11 +2264,6 @@ void statusline(message_type importance, const char *msg, ...)
if (importance < lastmessage && lastmessage > NOTICE)
return;
/* On a one-row terminal, ensure that any changes in the edit window are
* written out first, to prevent them from overwriting the message. */
if (LINES == 1 && importance < INFO)
wnoutrefresh(edit);
/* Construct the message out of all the arguments. */
compound = nmalloc(MAXCHARLEN * COLS + 1);
va_start(ap, msg);
@ -2281,6 +2276,11 @@ void statusline(message_type importance, const char *msg, ...)
openfile->errormessage = copy_of(compound);
#endif
/* On a one-row terminal, ensure that any changes in the edit window are
* written out first, to prevent them from overwriting the message. */
if (LINES == 1 && importance < INFO)
wnoutrefresh(edit);
/* If there are multiple alert messages, add trailing dots to the first. */
if (lastmessage == ALERT) {
if (start_col > 4) {