From 3cdc53c2be5d81a7219520c0bcb0eccd847abfdb Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Mon, 20 May 2019 08:18:32 +0000
Subject: [PATCH] FSEditor will now (by default) save messages/files with
 long-line paragraphs rather than word-wrapped lines, leaving it to the things
 that display messages to perform any line-wrapping as needed.

If you want/need the old behavior, set soft_cr=true in the [fseditor] section
of your ctrl/modopts.ini file (new feature/section).
---
 exec/fseditor.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/exec/fseditor.js b/exec/fseditor.js
index b2c063afd4..2c262d6b00 100644
--- a/exec/fseditor.js
+++ b/exec/fseditor.js
@@ -39,6 +39,10 @@ var stat_attr	= 0x1f;
 var stat_fmt	= "\1h\1w\0014 FSEditor v" + REVISION + " - Type \1yCTRL-K\1w for help          %s\1>\1n";
 var subj,to,from;
 
+var options = load('modopts.js', 'fseditor');
+if(!options)
+	options = {};
+
 function Line(copyfrom)
 {
 	var i;
@@ -1420,7 +1424,7 @@ function save_file()
 		alert("Error " + f.error + " opening " + f.name);
 		return false;
 	}
-	var s=make_strings(/* soft-CRs: */true, /* embed-colors: */true);
+	var s=make_strings(/* soft-CRs: */Boolean(options.soft_cr), /* embed-colors: */true);
 	f.write(s[0]);
 	f.close();
 	return true;
-- 
GitLab