anilgulecha/trelby — comment on commit 99f09f353bf187348ef534ccd11641d3b6260249
File:  line 0
By oskusalerma:

Found a serious problem, I think. You can't simply add a space at the front without adjusting line wrapping. Put on show formatting and input the text below:

JASON
(angrily, staring at xxxx
random passersby aldsfkj)

You'll see how xxxx is at the very end of the available space, but then the next line goes one beyond it since that line is max length as well but the code is adding the one-more-indent at the front. So we're overflowing the space allocated to us, which is not good.

To fix that, wrapLine also needs changing.

wrapLine is critical, as are getScreen and generatePMLPage, so I'd also like some stats for how much these changes slow down the program.