Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
4044f933
Commit
4044f933
authored
1 year ago
by
Eric Oulashin
Committed by
Rob Swindell
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
DDMsgReader: Allow word-wrapping header lines of arbitrary length
parent
bb482869
No related branches found
No related tags found
2 merge requests
!463
MRC mods by Codefenix (2024-10-20)
,
!287
DDMsgReader: Allow word-wrapping header lines of arbitrary length
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xtrn/DDMsgReader/DDMsgReader.js
+8
-15
8 additions, 15 deletions
xtrn/DDMsgReader/DDMsgReader.js
with
8 additions
and
15 deletions
xtrn/DDMsgReader/DDMsgReader.js
+
8
−
15
View file @
4044f933
...
...
@@ -12722,7 +12722,7 @@ function DigDistMsgReader_GetExtdMsgHdrInfo(pMsgHdr, pKludgeOnly)
if ((lastHdrFieldLabel == null) || (hdrFieldLabel != lastHdrFieldLabel))
{
msgHdrInfoLines.push("");
msgHdrInfoLines.push(hdrFieldLabel
+ "!"
);
msgHdrInfoLines.push(hdrFieldLabel);
}
var infoLineWrapped = msgHdr.field_list[fieldI].data;
var infoLineWrappedArray = lfexpand(infoLineWrapped).split("\r\n");
...
...
@@ -12868,24 +12868,18 @@ function DigDistMsgReader_GetExtdMsgHdrInfo(pMsgHdr, pKludgeOnly)
// Make sure the header lines aren't too long for the user's terminal.
// Leave a column for the scrollbar.
// Note: substrWithAttrCodes(pStr, pStartIdx, pLen) is defined in dd_lightbar_menu.js
var maxLen = console.screen_columns - 1;
var hdrInfoLinesWrapped = [];
for (var i = 0; i < msgHdrInfoLines.length; ++i)
{
var maxLen = console.screen_columns - 1;
var strLen = console.strlen(msgHdrInfoLines[i]);
if (console.strlen(msgHdrInfoLines[i]) > maxLen)
var wrappedLines = word_wrap(msgHdrInfoLines[i], maxLen).split("\n");
for (var wrappedI = 0; wrappedI < wrappedLines.length; ++wrappedI)
{
// This assumes the line will probably not span more than 2 lines after
// being split
var line1 = substrWithAttrCodes(msgHdrInfoLines[i], 0, maxLen);
var line2 = substrWithAttrCodes(msgHdrInfoLines[i], maxLen, maxLen);
msgHdrInfoLines[i] = line1;
msgHdrInfoLines.splice(i+1, 0, line2);
++i;
if (console.strlen(wrappedLines[wrappedI]) > 0)
hdrInfoLinesWrapped.push(wrappedLines[wrappedI]);
}
}
return msgHdrInfoLines;
return hdrInfoLinesWrapped;
}
// For the DigDistMsgReader class: Gets & prepares message information for
...
...
@@ -21344,7 +21338,6 @@ function quickValidateLocalUser(pUsername, pUseANSI, pQuickValSetIdx)
return retObj;
var useANSI = typeof(pUseANSI) === "boolean" ? pUseANSI : console.term_supports(USER_ANSI);
//useANSI = false; // Temporary
var userNum = system.matchuser(pUsername);
if (userNum == 0)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment