Skip to content
Snippets Groups Projects
Commit d707a037 authored by Eric Oulashin's avatar Eric Oulashin
Browse files

Simplified the reading of the quote wrap setting from xtrn.ini a bit

parent f01dd6ef
No related branches found
No related tags found
1 merge request!236DDMsgReader: For Synchronet >= 3.20, read external editor quote wrap setting from xtrn.ini (rather than xtrn.cnf)
Pipeline #3548 passed
......@@ -20240,12 +20240,9 @@ function getExternalEditorQuoteWrapCfgFromSCFG(pEditorCode)
var xtrnIniFile = new File(system.ctrl_dir + "xtrn.ini");
if (xtrnIniFile.open("r"))
{
var editorCfg = xtrnIniFile.iniGetObject("editor:" + pEditorCode.toUpperCase());
if (typeof(editorCfg) === "object" && editorCfg.hasOwnProperty("quotewrap_cols"))
{
if (editorCfg.quotewrap_cols > 0)
retObj.quoteWrapCols = editorCfg.quotewrap_cols;
}
var quoteWrapCols = xtrnIniFile.iniGetValue("editor:" + pEditorCode.toUpperCase(), "quotewrap_cols", console.screen_columns - 1);
if (quoteWrapCols > 0)
retObj.quoteWrapCols = quoteWrapCols;
xtrnIniFile.close();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment