From cb9d14bd8a198447d20ccd4be848df679a3047d9 Mon Sep 17 00:00:00 2001 From: Sadrul Habib Chowdhury Date: Mon, 28 Jul 2008 20:28:05 -0400 Subject: [PATCH] Fix a caption update issue when a status message is being displayed. The caption string is not updated immediately if a status message is being displayed. When the status message is erased after the timeout, not all of the caption string is redrawn. As a result, if the caption had changed while the status message was being displayed, it's not updated properly. Reported in #23945. This change fixes the bug. --- src/display.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/display.c b/src/display.c index 493c7b0..ca8004f 100644 --- a/src/display.c +++ b/src/display.c @@ -2769,17 +2769,13 @@ RemoveStatus() return; if (!(where = D_status)) return; - + debug("RemoveStatus\n"); if (D_status_obuffree >= 0) { D_obuflen = D_status_obuflen; D_obuffree = D_status_obuffree; D_status_obuffree = -1; - D_status = 0; - D_status_bell = 0; - evdeq(&D_statusev); - return; } D_status = 0; D_status_bell = 0; @@ -2941,7 +2937,11 @@ int y, from, to, isblank; debug2(" %d %d\n", to, isblank); if (D_status == STATUS_ON_WIN && y == STATLINE) - return; /* can't refresh status */ + { + if (to >= D_status_len) + D_status_len = to + 1; + return; /* can't refresh status */ + } if (y == D_height - 1 && D_has_hstatus == HSTATUS_LASTLINE) { -- 2.11.4.GIT