summaryrefslogtreecommitdiff
path: root/pango/pango-markup.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2000-11-01 23:37:28 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-11-01 23:37:28 +0000
commit3ef9bb08b0b8ea7b36089d90a6d091f7e3f32307 (patch)
treefce1f6e2d033a4424f1b0a817f7dc95089edb10a /pango/pango-markup.c
parent944d744a867f9b612cacf83605514a8a926933d1 (diff)
downloadpango-3ef9bb08b0b8ea7b36089d90a6d091f7e3f32307.tar.gz
Fix bug where not all text was appended when parsing accelerators
2000-11-01 Havoc Pennington <hp@redhat.com> * pango/pango-markup.c (text_handler): Fix bug where not all text was appended when parsing accelerators
Diffstat (limited to 'pango/pango-markup.c')
-rw-r--r--pango/pango-markup.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index 2ae6dcbc..6be17320 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -511,6 +511,21 @@ text_handler (GMarkupParseContext *context,
p = g_utf8_next_char (p);
}
+ if (range_end)
+ {
+ g_string_append_len (md->text,
+ range_start,
+ range_end - range_start);
+ md->index += range_end - range_start;
+ }
+ else
+ {
+ g_string_append_len (md->text,
+ range_start,
+ end - range_start);
+ md->index += end - range_start;
+ }
+
if (md->attr_list != NULL && uline_index >= 0)
{
/* Add the underline indicating the accelerator */