Skip to content
Snippets Groups Projects
Commit d47c0f33 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'dd_msg_reader_strict_fixes' into 'master'

DDMsgReader: Fix for undefined bottomMsgIndex when going to a message in the lightbar list, and strict mode fixes

See merge request !197
parents 961f1f58 02cafb6b
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!197DDMsgReader: Fix for undefined bottomMsgIndex when going to a message in the lightbar list, and strict mode fixes
...@@ -3646,7 +3646,8 @@ function DigDistMsgReader_ListMessages_Lightbar(pAllowChgSubBoard) ...@@ -3646,7 +3646,8 @@ function DigDistMsgReader_ListMessages_Lightbar(pAllowChgSubBoard)
// results if there are any (we'll need to have the correct array // results if there are any (we'll need to have the correct array
// index for the search results). // index for the search results).
var chosenMsgIndex = userMsgNum - 1; var chosenMsgIndex = userMsgNum - 1;
if ((chosenMsgIndex <= bottomMsgIndex) && (chosenMsgIndex >= this.lightbarListTopMsgIdx)) msgListMenu.selectedItemIdx = chosenMsgIndex;
if ((chosenMsgIndex < msgListMenu.NumItems()) && (chosenMsgIndex >= this.lightbarListTopMsgIdx))
{ {
this.lightbarListSelectedMsgIdx = chosenMsgIndex; this.lightbarListSelectedMsgIdx = chosenMsgIndex;
msgListMenu.selectedItemIdx = this.lightbarListSelectedMsgIdx; msgListMenu.selectedItemIdx = this.lightbarListSelectedMsgIdx;
...@@ -7587,7 +7588,7 @@ function DigDistMsgReader_SetEnhancedReaderHelpLine() ...@@ -7587,7 +7588,7 @@ function DigDistMsgReader_SetEnhancedReaderHelpLine()
{ {
// TODO: We don't really need to include the ) on the ones with the ). That is // TODO: We don't really need to include the ) on the ones with the ). That is
// just to ensure we find the right ones. // just to ensure we find the right ones.
for (strI = 0; strI < toSearch[i].length; ++strI) for (var strI = 0; strI < toSearch[i].length; ++strI)
{ {
var clickInfoObj = { x: helpLineIdx+strI+1, var clickInfoObj = { x: helpLineIdx+strI+1,
y: console.screen_rows, y: console.screen_rows,
...@@ -17744,7 +17745,7 @@ function removeInitialColorFromMsgBody(pMsgBody) ...@@ -17744,7 +17745,7 @@ function removeInitialColorFromMsgBody(pMsgBody)
   
var msgBody = pMsgBody; var msgBody = pMsgBody;
   
msgBodyLines = pMsgBody.split("\r\n", 3); var msgBodyLines = pMsgBody.split("\r\n", 3);
if (msgBodyLines.length == 3) if (msgBodyLines.length == 3)
{ {
var onlySyncAttrsRegexWholeWord = new RegExp("^(\x01[krgybmcw01234567hinpq,;\.dtl<>\[\]asz])+$", 'i'); var onlySyncAttrsRegexWholeWord = new RegExp("^(\x01[krgybmcw01234567hinpq,;\.dtl<>\[\]asz])+$", 'i');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment