commit 5954eeaff27402e7e4f1346f61fad2af4f9a5e9b
parent c84a7697339a43c01f00d2f944e86b3efbb6c93c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 14 Jul 2021 10:08:32 +0200
tweaks: reshuffle a fragment of code, to prepare for the next change
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -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) {