diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-01-23 09:55:46 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-01-23 09:55:46 -0500 |
commit | 6fd53f28f3a6eb3bb9bc5947748242de826061a6 (patch) | |
tree | ae9a8448596f9446adada4efc93c235a37890ab2 /gtk/gtktextutil.c | |
parent | fefc8b5a82fc33d38862bc927f1b9c0be288b554 (diff) | |
download | gtk+-6fd53f28f3a6eb3bb9bc5947748242de826061a6.tar.gz |
Use pango api better
Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.#
Diffstat (limited to 'gtk/gtktextutil.c')
-rw-r--r-- | gtk/gtktextutil.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c index 6570994bb2..75f081732a 100644 --- a/gtk/gtktextutil.c +++ b/gtk/gtktextutil.c @@ -50,7 +50,9 @@ append_n_lines (GString *str, const char *text, GSList *lines, int n_lines) for (i = 0; i < n_lines; i++) { line = lines->data; - g_string_append_len (str, &text[line->start_index], line->length); + g_string_append_len (str, + &text[pango_layout_line_get_start_index (line)], + pango_layout_line_get_length (line)); lines = lines->next; } } |