Text word-wrapping: incorrect behaviour

Create issue
Issue #251 new
Paul Turner created an issue

When word-wrapping is in use (at least in the multi-line editbox), if the string being processed starts with a space and is followed by a long word that would cause the line to wrap, the result is a blank line (unexpected) followed by the long word that then wraps at the window edge (as expected).

In this scenario, the initial blank line is likely not expected behaviour.

Update: Having run a second test, it's also possible to have a situation where a line that has been wrapped correctly, might start with a space and thus exhibit the same incorrect behaviour; in these cases the result would be a blank line in a block of what should have been unbroken text.

Reproducibility: always

Additional information: See: http://www.cegui.org.uk/phpBB2/viewtopic.php?t=3701 for original report.

Comments (1)

  1. Lukas Meindl
    • edited description
    • changed milestone to 1.0.0

    The first part of the issue explained in the thread coincides with the "what to do with a whitespace when a word is wrapped" issue. I agree with jamarr on this and I would call the "blank line" problem not a problem but correct behaviour and something a user should expect. No changes needed.

    The second part of the issue seems to be related to the type of Delimiter in use. This should be fixed in 1.0 by adding a new property for all wrappable widgets that allows to change this delimiter. A bool for newline vs. nothing should be enough imo.

  2. Log in to comment