summaryrefslogtreecommitdiff
path: root/pango/pango-layout.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-09-02 17:55:38 +0100
committerMatthias Clasen <mclasen@redhat.com>2019-09-02 17:25:27 -0400
commit8ec0d2b23ab87cc686cffd2708d547c0ec7dcc85 (patch)
tree83ccca9e5fb81f741246fdf4c45566dc3aa933f8 /pango/pango-layout.c
parent9b03a14f88b152ea312453faa3643216c0fefe30 (diff)
downloadpango-8ec0d2b23ab87cc686cffd2708d547c0ec7dcc85.tar.gz
Drop some leftover code
In d6bc8daa6935b53c1, we added code to remove "hyphen runs". But we no longer create such runs, so this code is harmful and can cause crashes under certain circumstances. Closes: https://gitlab.gnome.org/GNOME/pango/issues/418
Diffstat (limited to 'pango/pango-layout.c')
-rw-r--r--pango/pango-layout.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 7404dd77..b63d8cbe 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -2992,8 +2992,7 @@ free_run (PangoLayoutRun *run, gpointer data)
static PangoItem *
uninsert_run (PangoLayoutLine *line)
{
- PangoLayout *layout = line->layout;
- PangoLayoutRun *run, *prev;
+ PangoLayoutRun *run;
PangoItem *item;
GSList *tmp_node = line->runs;
@@ -3004,18 +3003,6 @@ uninsert_run (PangoLayoutLine *line)
line->runs = tmp_node->next;
line->length -= item->length;
- if (item->length == 2 &&
- strncmp (layout->text + run->item->offset, "\302\255", 2) == 0)
- {
- /* this is a hyphen run, add the SHY back
- * to the previous item
- */
- prev = line->runs->data;
- item = prev->item;
- item->length += 2;
- item->num_chars += 1;
- }
-
g_slist_free_1 (tmp_node);
free_run (run, (gpointer)FALSE);