Fix: echo ignoring newlines after deleteLine() and echo inserting symbol for carriage return#9218
Open
jmckisson wants to merge 5 commits into
Open
Fix: echo ignoring newlines after deleteLine() and echo inserting symbol for carriage return#9218jmckisson wants to merge 5 commits into
jmckisson wants to merge 5 commits into
Conversation
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
Contributor
|
Reviews (1): Last reviewed commit: "striup carriage return from echo" | Re-trigger Greptile |
Member
|
Thanks for the PR! Could you add some examples to test 4.19 and this PR with? |
Contributor
Author
|
Done, added to the initial post |
Contributor
|
/refresh links |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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")