Skip to content

Fix: echo ignoring newlines after deleteLine() and echo inserting symbol for carriage return#9218

Open
jmckisson wants to merge 5 commits into
Mudlet:developmentfrom
jmckisson:wrap-fix
Open

Fix: echo ignoring newlines after deleteLine() and echo inserting symbol for carriage return#9218
jmckisson wants to merge 5 commits into
Mudlet:developmentfrom
jmckisson:wrap-fix

Conversation

@jmckisson
Copy link
Copy Markdown
Contributor

@jmckisson jmckisson commented Apr 22, 2026

Brief overview of PR changes/additions

The echo ignoring newlines after a deleteLine() is a regression from 4.19 and 4.20.

This also strips carriage returns from echos which is done normally by the telnet stream but NOT for the echo path, so now this is consistent and doesn't try to render a carriage return + newline as a glyph.

Motivation for adding to Mudlet

Proper behavior for using echo/cecho/decho/etc when including newlines and carriage returns.

Other info (issues closed, discussion etc)

https://discord.com/channels/283581582550237184/283582068334526464/1495549390159351870

##Examples to test##
For the newline issue, simply make a trigger that does a deleteLine() followed by an echo(), such as this:
-- prompt trigger, or perhaps a substitution type trigger deleteLine() echo("\nthis should show up on a new line\n")

For the carriage return issue:
echo("\r\nthis should not have a music note symbol, AND should be on a new line\r\n")

@jmckisson jmckisson requested a review from a team as a code owner April 22, 2026 13:21
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links Bot commented Apr 22, 2026

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 22, 2026

Reviews (1): Last reviewed commit: "striup carriage return from echo" | Re-trigger Greptile

Comment thread src/TConsole.cpp Outdated
Comment thread src/TBuffer.cpp Outdated
@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Apr 23, 2026

Thanks for the PR! Could you add some examples to test 4.19 and this PR with?

@jmckisson
Copy link
Copy Markdown
Contributor Author

Done, added to the initial post

@ZookaOnGit ZookaOnGit added this to the 4.21.0 next release milestone Apr 26, 2026
@ZookaOnGit
Copy link
Copy Markdown
Contributor

/refresh links

jmckisson and others added 2 commits May 16, 2026 10:01
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants