projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fefc8b5
)
Use pango api better
author
Matthias Clasen
<mclasen@redhat.com>
Sun, 23 Jan 2022 14:55:46 +0000
(09:55 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Sun, 23 Jan 2022 14:55:46 +0000
(09:55 -0500)
Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.#
gtk/gtktextutil.c
patch
|
blob
|
history
diff --git
a/gtk/gtktextutil.c
b/gtk/gtktextutil.c
index 6570994bb219481dab7ba4c53a5677a767d420ed..75f081732a6642404b839b98911a684f807041da 100644
(file)
--- 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;
}
}