From 5954eeaff27402e7e4f1346f61fad2af4f9a5e9b Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 14 Jul 2021 10:08:32 +0200 Subject: [PATCH] tweaks: reshuffle a fragment of code, to prepare for the next change --- src/winio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/winio.c b/src/winio.c index 0cb35466..95a01da2 100644 --- 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) {