revery icon indicating copy to clipboard operation
revery copied to clipboard

Fix bug with text wrapping past max width

Open msvbg opened this issue 5 years ago • 2 comments

TextWrapping.wrapText can throw an exception when trying to wrap text that's too wide for the container. To be fair, I don't totally understand the code here so I may have messed something up. But the supplied test case throws an exception without this change to TextWrapping.re, so that's something at least.

On another note, it may be worthwhile to look at Jane Street's Base instead of the Ocaml standard library, which throws exceptions like String.sub does here.

msvbg avatar Apr 05 '19 10:04 msvbg

I am happy to announce that this now passes CI, after using esy 0.5.6.

msvbg avatar Apr 12 '19 22:04 msvbg

Whoops, looks like this PR kinda got ignored 😅 Hopefully the work for this is superseded by #685 but gonna keep this open temporarily in-case a similar bug exists in new text-wrapping lib since it's using String.sub as well.

OhadRau avatar Dec 27 '19 22:12 OhadRau