diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-15 12:08:27 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-15 12:08:27 +0300 |
commit | 2f3987f5e54d95658f95c6991b0644bc15eedabf (patch) | |
tree | c8b76534a2b5d758c3062603afb3b2665856a548 /src/ui/documentwidget.c | |
parent | f5938745dcbe567d6e52f79b63151584d2c917d8 (diff) |
Text: Fixed a line wrapping issue
When the last safe break position was not in the current attributed run, the calculated wrap advance came out incorrect. This was possible when the first glyph in an attributed run didn't fit.
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 8fefb95c..924dc0c4 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -4522,8 +4522,10 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
4522 | } | 4522 | } |
4523 | } | 4523 | } |
4524 | } | 4524 | } |
4525 | // drawRect_Paint(&d->paint, (iRect){ visPos, run->bounds.size }, green_ColorId); | 4525 | if (0) { |
4526 | // drawRect_Paint(&d->paint, (iRect){ visPos, run->visBounds.size }, red_ColorId); | 4526 | drawRect_Paint(&d->paint, (iRect){ visPos, run->bounds.size }, green_ColorId); |
4527 | drawRect_Paint(&d->paint, (iRect){ visPos, run->visBounds.size }, red_ColorId); | ||
4528 | } | ||
4527 | } | 4529 | } |
4528 | 4530 | ||
4529 | static int drawSideRect_(iPaint *p, iRect rect) { | 4531 | static int drawSideRect_(iPaint *p, iRect rect) { |