(solved) TextParagraph - last char in line disappears

Godot Version

4.3

Question

(no, it’s probably not related to a recent issue #110577 on github with latest versions. My Godot version is 4.3)

Hello, i have an issue with a TextParagraph.
I draw and scroll some text. In some lines, one last character gets eaten (not visible), but it appears at one point when scrolling.

I checked, the disappearing character is present in the data.

I do the “scrolling” by trimming the first line and re-inserting text into TextParagraph all over, so after each scrolling the text is “new”. To draw, i use the TextParagraph.draw() call.

So, does anyone know how to fix this?
(I also suspect that horizontal tabs have something to do with it.)

The minimal example: test project (it is also on screenshots). (You scroll with down arrow key, but before that you have to click inside the window to focus the area.)

update: I might have found the answer. In the example, i’m using a single TextParagraph to keep all the text. I created many TextParagraph’s, one for each string, and the problem is gone.

So it looks like TextParagraph is not supposed to have newline characters, or in other words, more than one actual paragraph in it. Though it allows them.