From 64bfca0916b03c36ce4ec956a4409a3035c628fa Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Sun, 22 Nov 2020 22:39:10 -0800
Subject: [PATCH] If both WIN_ORG and WIN_SAV modes are specified, don't clear
 save buffers.

umonitor uses these mode flags together (or soon will) and bad things happen
if you always clear the buffers that you're trying to save/restore.
---
 src/uifc/uifc32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c
index a91e0a25ee..0982b4307a 100644
--- a/src/uifc/uifc32.c
+++ b/src/uifc/uifc32.c
@@ -770,7 +770,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
 	if(mode&WIN_DYN && mode&WIN_NODRAW)
 		is_redraw=0;
 
-	if(mode&WIN_ORG) {		/* Clear all save buffers on WIN_ORG */
+	if(mode&WIN_ORG && !(mode&WIN_SAV)) {		/* Clear all save buffers on WIN_ORG */
 		for(i=0; i< MAX_BUFS; i++)
 			FREE_AND_NULL(sav[i].buf);
 		api->savnum=0;
-- 
GitLab