From 3e6e0151afaff74a1127eaa639e53c00d04d1ecf Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Wed, 10 Apr 2019 16:31:02 +0800 Subject: [PATCH] check ellipsized for next line --- src/newgdi/layout.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/newgdi/layout.c b/src/newgdi/layout.c index 6b83d504..53c1f010 100644 --- a/src/newgdi/layout.c +++ b/src/newgdi/layout.c @@ -1727,8 +1727,8 @@ static void layout_line_postprocess (LAYOUTLINE *line, justify_words (line, state); } - line->is_wrapped |= wrapped; - line->is_ellipsized |= ellipsized; + line->is_wrapped = wrapped ? 1 : 0; + line->is_ellipsized = ellipsized ? 1 : 0; } static LAYOUTLINE* check_next_line(LAYOUT* layout, LayoutState* state) @@ -2291,7 +2291,10 @@ LAYOUTLINE* GUIAPI LayoutNextLine( } layout->nr_lines++; - layout->nr_left_ucs -= next_line->len; + if (next_line->is_ellipsized) + layout->nr_left_ucs = 0; + else + layout->nr_left_ucs -= next_line->len; } // Release the previous line after got the next line.