For a clean, referenceable example, I copied and pasted code directly from the Mudlet manual. Code sample below from https://wiki.mudlet.org/w/Manual:UI_Functions. I ran this in a clean profile in both 4.19.1 and it worked as expected and ran it in 4.20.1 and the newline from insertText("sys", "------- line inserted at: 0/0 -----\n") did not work.
-- set up the small system message window in the top right corner
-- determine the size of your screen
local WindowWidth, WindowHeight = getMainWindowSize()
-- define a mini console named "sys" and set its background color
createMiniConsole("sys",WindowWidth-650,0,650,300)
setBackgroundColor("sys",85,55,0,255)
-- you *must* set the font size, otherwise mini windows will not work properly
setMiniConsoleFontSize("sys", 12)
-- wrap lines in window "sys" at 65 characters per line
setWindowWrap("sys", 60)
-- set default font colors and font style for window "sys"
setTextFormat("sys",0,35,255,50,50,50,0,0,0)
-- clear the window
clearUserWindow("sys")
moveCursorEnd("sys")
setFgColor("sys", 10,10,0)
setBgColor("sys", 0,0,255)
echo("sys", "test1---line1\n<this line is to be deleted>\n<this line is to be deleted also>\n")
echo("sys", "test1---line2\n")
echo("sys", "test1---line3\n")
setTextFormat("sys",158,0,255,255,0,255,0,0,0);
--setFgColor("sys",255,0,0);
echo("sys", "test1---line4\n")
echo("sys", "test1---line5\n")
moveCursor("sys", 1,1)
-- deleting lines 2+3
deleteLine("sys")
deleteLine("sys")
-- inserting a line at pos 5,2
moveCursor("sys", 5,2)
setFgColor("sys", 100,100,0)
setBgColor("sys", 255,100,0)
insertText("sys","############## line inserted at pos 5/2 ##############")
-- inserting a line at pos 0,0
moveCursor("sys", 0,0)
selectCurrentLine("sys")
setFgColor("sys", 255,155,255)
setBold( "sys", true );
setUnderline( "sys", true )
setItalics( "sys", true )
insertText("sys", "------- line inserted at: 0/0 -----\n")
setBold( "sys", true )
setUnderline( "sys", false )
setItalics( "sys", false )
setFgColor("sys", 255,100,0)
setBgColor("sys", 155,155,0)
echo("sys", "*** This is the end. ***\n")```
Brief summary of issue:
Newlines in insertText and cinsertText no longer work as of 4.20.1
Steps to reproduce the issue:
Error output
Extra information, such as the Mudlet version, operating system and ideas for how to solve:
For a clean, referenceable example, I copied and pasted code directly from the Mudlet manual. Code sample below from https://wiki.mudlet.org/w/Manual:UI_Functions. I ran this in a clean profile in both 4.19.1 and it worked as expected and ran it in 4.20.1 and the newline from
insertText("sys", "------- line inserted at: 0/0 -----\n")did not work.