Fix: Wordwrap for MiniConsole and echo#7039
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. |
2b7a8da to
7685eda
Compare
|
Could you also add "fixes #5936" to the ticket, that way Github links the issue and PR together. |
|
@demonnic mind testing this one? |
7685eda to
a65cdac
Compare
03ddae1 to
0d81bad
Compare
|
Cool! What is the before & after with 100,000 lines on your machine? |
|
Did you also fix #5564 by accident with this? |
As a solution I think that initially this seems good enough to get the prize - I might fiddle with it later on so that it uses the |
<!-- Keep the title short & concise so anyone non-technical can
understand it,
the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
* Added a `TBuffer::wrapText`. It takes a QString, and returns a wrapped
and indented version of that QString.
* Modified both `TConsole::print` functions to wrap the message before
calling `TBuffer::append`.
#### Motivation for adding to Mudlet
MiniConsole output was not being intented. The following script did not
work as expected:
```lua
Geyser.MiniConsole:new({name = "indent-test"})
setWindowWrapIndent("indent-test", 10)
echo("indent-test", "This is the song that doesn't end, yes it goes on and on my friend, some people started singing it not knowing what it was, and they'll continue singing it forever just because this is the song that doesn't end...")
```
/claim Mudlet#5936
fixes Mudlet#5936
#### Other info (issues closed, discussion etc)
Fixed for MiniConsole:

Fixed for echo:

<!-- Keep the title short & concise so anyone non-technical can
understand it,
the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
This reverts commit 8d83f78 / PR
#7039.
#### Motivation for adding to Mudlet
Fixes #7316
#### Other info (issues closed, discussion etc)
This is a high-level issue that has been affecting many players for many
months now, and unfortunately it has no traction in getting fixed. It is
also holding up a release. Lets revert it so we can do a release with
all of the other fixes that have been done.
The bounty for the original issue was already paid out and unfortunately
the author is unresponsive in providing a fix, so we'll just deduct the
incorrectly paid out bounty amount in a future bounty.
Co-authored-by: Vadim Peretokin <vadi2@users.noreply.github.com>








Brief overview of PR changes/additions
TBuffer::wrapText. It takes a QString, and returns a wrapped and indented version of that QString.TConsole::printfunctions to wrap the message before callingTBuffer::append.Motivation for adding to Mudlet
MiniConsole output was not being intented. The following script did not work as expected:
/claim #5936
fixes #5936
Other info (issues closed, discussion etc)
Fixed for MiniConsole:

Fixed for echo:
