From a0d98e6d9ce0bdc338fa0b5ae9c73f5fb6185ef3 Mon Sep 17 00:00:00 2001
From: Eric Oulashin <nightfox@synchro.net>
Date: Mon, 4 Nov 2024 19:37:33 +0000
Subject: [PATCH] DDMsgReader: For ANSI terminals, refresh the area change
 header ANSI and header lines when exiting from the new scrollable area change
 help window

---
 xtrn/DDMsgReader/DDMsgReader.js       | 17 +++++++++++++++--
 xtrn/DDMsgReader/ddmr_cfg.js          |  4 ++--
 xtrn/DDMsgReader/readme.txt           |  4 ++--
 xtrn/DDMsgReader/revision_history.txt |  4 ++++
 4 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/xtrn/DDMsgReader/DDMsgReader.js b/xtrn/DDMsgReader/DDMsgReader.js
index 7c0963b1ed..2c86f11e48 100644
--- a/xtrn/DDMsgReader/DDMsgReader.js
+++ b/xtrn/DDMsgReader/DDMsgReader.js
@@ -180,6 +180,11 @@
  *                              screens could potentially be shown this way too.
  *                              New theme configuration options: helpWinBorderColor and
  *                              scrollingWinHelpTextColor
+ * 2024-11-03 Eric Oulashin     Version 1.96b
+ *                              Bug fix: When displaying the new scrollable area change help
+ *                              window, if there's an area change header in use, refresh it
+ *                              and the header lines, since the scrollable help window would
+ *                              display over them.
  */
 
 "use strict";
@@ -287,8 +292,8 @@ var hexdump = load('hexdump_lib.js');
 
 
 // Reader version information
-var READER_VERSION = "1.96a";
-var READER_DATE = "2024-11-02";
+var READER_VERSION = "1.96b";
+var READER_DATE = "2024-11-03";
 
 // Keyboard key codes for displaying on the screen
 var UP_ARROW = ascii(24);
@@ -13145,7 +13150,15 @@ function DigDistMsgReader_SelectMsgArea_Lightbar(pMsgGrp, pGrpIdx)
 		{
 			var screenInfo = this.ShowChooseMsgAreaHelp(!chooseMsgGrp, true, true);
 			msgAreaMenu.DrawPartialAbs(screenInfo.topLeftX, screenInfo.topLeftY, screenInfo.width, screenInfo.height);
+			// If there's an area change header, refresh the header and the header lines,
+			// since the help window will display over it
+			if (this.areaChangeHdrLines.length > 0)
+			{
+				this.DisplayAreaChgHdr(1);
+				displayListHdrLines(this.areaChangeHdrLines.length+1, chooseMsgGrp, this);
+			}
 			drawMenu = false;
+			// Older, with a non-scrolling help screen:
 			/*
 			this.ShowChooseMsgAreaHelp(!chooseMsgGrp, true, true);
 			console.pause();
diff --git a/xtrn/DDMsgReader/ddmr_cfg.js b/xtrn/DDMsgReader/ddmr_cfg.js
index 0bc9dae169..2249d47104 100644
--- a/xtrn/DDMsgReader/ddmr_cfg.js
+++ b/xtrn/DDMsgReader/ddmr_cfg.js
@@ -5,7 +5,7 @@
 // If you have DDMsgReader in a directory other than xtrn/DDMsgReader, then the changes to
 // DDMsgReader.cfg will be saved in that directory (assuming you're running ddmr_cfg.js from
 // that same directory).
-// Currently for DDMsgReader 1.96a.
+// Currently for DDMsgReader 1.96b.
 //
 // If you're running DDMsgReader from xtrn/DDMsgReader (the standard location) and you want
 // to save the configuration file there (rather than sbbs/mods), you can use one of the
@@ -18,7 +18,7 @@ require("sbbsdefs.js", "P_NONE");
 require("uifcdefs.js", "UIFC_INMSG");
 
 
-if (!uifc.init("DigDist. Message Reader 1.96a Configurator"))
+if (!uifc.init("DigDist. Message Reader 1.96b Configurator"))
 {
 	print("Failed to initialize uifc");
 	exit(1);
diff --git a/xtrn/DDMsgReader/readme.txt b/xtrn/DDMsgReader/readme.txt
index e4f580a30e..fa412371dc 100644
--- a/xtrn/DDMsgReader/readme.txt
+++ b/xtrn/DDMsgReader/readme.txt
@@ -1,6 +1,6 @@
                       Digital Distortion Message Reader
-                                 Version 1.96a
-                           Release date: 2024-11-02
+                                 Version 1.96b
+                           Release date: 2024-11-03
 
                                      by
 
diff --git a/xtrn/DDMsgReader/revision_history.txt b/xtrn/DDMsgReader/revision_history.txt
index 8a8e703ae7..1d78651aae 100644
--- a/xtrn/DDMsgReader/revision_history.txt
+++ b/xtrn/DDMsgReader/revision_history.txt
@@ -5,6 +5,10 @@ Revision History (change log)
 =============================
 Version  Date         Description
 -------  ----         -----------
+1.96b    2024-11-03   Bug fix: When displaying the new scrollable area change
+                      help window, if there's an area change header in use,
+                      refresh it and the header lines, since the scrollable help
+                      window would display over them.
 1.96a    2024-11-02   When changing to another sub-board, the user can now cycle
                       through the sort options with the [ and ] keys. Also,
                       updated the change sub-board help to show in a scrollable
-- 
GitLab