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
e9c68a67
Commit
e9c68a67
authored
2 years ago
by
Eric Oulashin
Committed by
Rob Swindell
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
DDMsgReader: (Hopefully) improved display of certain ANSI messages
parent
02a3031a
No related branches found
No related tags found
2 merge requests
!463
MRC mods by Codefenix (2024-10-20)
,
!250
DDMsgReader: (Hopefully) improved display of certain ANSI messages
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
xtrn/DDMsgReader/DDMsgReader.js
+24
-7
24 additions, 7 deletions
xtrn/DDMsgReader/DDMsgReader.js
xtrn/DDMsgReader/readme.txt
+2
-2
2 additions, 2 deletions
xtrn/DDMsgReader/readme.txt
xtrn/DDMsgReader/revision_history.txt
+2
-0
2 additions, 0 deletions
xtrn/DDMsgReader/revision_history.txt
with
28 additions
and
9 deletions
xtrn/DDMsgReader/DDMsgReader.js
+
24
−
7
View file @
e9c68a67
...
...
@@ -85,6 +85,9 @@
* no longer gives the error "Invalid user field: 0"; also, if the sender is
* unknown, prompts the user for a user name/number/email address to send
* the reply to.
* 2023-01-30 Eric Oulashin Version 1.62
* (Hopefully) Improved display of ANSI messages which would previously look
* bad with empty lines evrey other line
*/
"use strict";
...
...
@@ -189,8 +192,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a');
// Reader version information
var READER_VERSION = "1.6
1
";
var READER_DATE = "2023-01-
22
";
var READER_VERSION = "1.6
2
";
var READER_DATE = "2023-01-
30
";
// Keyboard key codes for displaying on the screen
var UP_ARROW = ascii(24);
...
...
@@ -4846,11 +4849,15 @@ function DigDistMsgReader_ReadMessageEnhanced_Scrollable(msgHeader, allowChgMsgA
if (msgHasANSICodes)
{
messageText = messageText.replace(/\u001b\[[012]J/gi, "");
var graphic = new Graphic(msgAreaWidth, this.msgAreaHeight-1);
//var graphic = new Graphic(msgAreaWidth, this.msgAreaHeight-1);
// To help ensure ANSI messages look good, it seems the Graphic object should have
// its with later set to 1 less than the width used to create it.
var graphicWidth = (msgAreaWidth < console.screen_columns ? msgAreaWidth+1 : console.screen_columns);
var graphic = new Graphic(graphicWidth, this.msgAreaHeight-1);
graphic.auto_extend = true;
graphic.ANSI = ansiterm.expand_ctrl_a(messageText);
//graphic.normalize();
//
graphic.width =
msgArea
Width;
graphic.width =
graphic
Width
- 1
;
//messageText = graphic.MSG.split('\n');
messageText = graphic.MSG;
}
...
...
@@ -5928,10 +5935,15 @@ function DigDistMsgReader_ReadMessageEnhanced_Scrollable(msgHeader, allowChgMsgA
// new width
if (msgHasANSICodes)
{
var graphic = new Graphic(msgAreaWidth, this.msgAreaHeight-1);
//var graphic = new Graphic(msgAreaWidth, this.msgAreaHeight-1);
// To help ensure ANSI messages look good, it seems the Graphic object should have
// its with later set to 1 less than the width used to create it.
var graphicWidth = (msgAreaWidth < console.screen_columns ? msgAreaWidth+1 : console.screen_columns);
var graphic = new Graphic(graphicWidth, this.msgAreaHeight-1);
graphic.auto_extend = true;
graphic.ANSI = ansiterm.expand_ctrl_a(messageText);
graphic.width = msgAreaWidth;
//graphic.width = msgAreaWidth;
graphic.width = graphicWidth - 1;
messageText = graphic.MSG;
}
// Display or erase the scrollbar
...
...
@@ -13975,9 +13987,14 @@ function DigDistMsgReader_SaveMsgToFile(pMsgHdr, pFilename)
{
if (textHasDrawingChars(msgBody))
{
var graphic = new Graphic(this.msgAreaWidth, this.msgAreaHeight);
//var graphic = new Graphic(this.msgAreaWidth, this.msgAreaHeight);
// To help ensure ANSI messages look good, it seems the Graphic object should have
// its with later set to 1 less than the width used to create it.
var graphicWidth = (msgAreaWidth < console.screen_columns ? msgAreaWidth+1 : console.screen_columns);
var graphic = new Graphic(graphicWidth, this.msgAreaHeight);
graphic.auto_extend = true;
graphic.ANSI = ansiterm.expand_ctrl_a(msgBody);
graphic.width = graphicWidth - 1;
msgBody = syncAttrCodesToANSI(graphic.MSG);
}
else
...
...
This diff is collapsed.
Click to expand it.
xtrn/DDMsgReader/readme.txt
+
2
−
2
View file @
e9c68a67
Digital Distortion Message Reader
Version 1.6
1
Release date: 2023-01-
22
Version 1.6
2
Release date: 2023-01-
30
by
...
...
This diff is collapsed.
Click to expand it.
xtrn/DDMsgReader/revision_history.txt
+
2
−
0
View file @
e9c68a67
...
...
@@ -5,6 +5,8 @@ Revision History (change log)
=============================
Version Date Description
------- ---- -----------
1.62 2023-01-30 (Hopefully) Improved display of ANSI messages which would
previously look bad with empty lines evrey other line
1.61 2023-01-22 Fix: When replying to an email with an unknown sender
(empty or "All"), no longer gives the error "Invalid user
field: 0"; also, if the sender is unknown, prompts the
...
...
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