summaryrefslogtreecommitdiff
path: root/pango/pango-glyph-item.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-08-08 00:00:37 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-08-08 00:00:37 +0000
commit647c72eb9e9e6ad8684c3f06fb1ab9a517496f10 (patch)
treef0175a64dd2cd8c7644ac4eb5a129230df70b325 /pango/pango-glyph-item.c
parent3f7461a4f046f2c9a99bb586dae4753faa14ab1f (diff)
downloadpango-647c72eb9e9e6ad8684c3f06fb1ab9a517496f10.tar.gz
Bug 464270 – ellipsize doesn't work consistent
2007-08-07 Behdad Esfahbod <behdad@gnome.org> Bug 464270 – ellipsize doesn't work consistent * pango/pango-glyph-item.c (_pango_glyph_item_iter_prev_cluster): Fix. Was jumping two clusters at a time. Oops! * pango/ellipsize.c (init_state): Minor cleanup. svn path=/trunk/; revision=2392
Diffstat (limited to 'pango/pango-glyph-item.c')
-rw-r--r--pango/pango-glyph-item.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pango/pango-glyph-item.c b/pango/pango-glyph-item.c
index 157bb150..07b844bc 100644
--- a/pango/pango-glyph-item.c
+++ b/pango/pango-glyph-item.c
@@ -280,6 +280,7 @@ _pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter)
if (glyphs->log_clusters[glyph_index] != cluster)
{
+ glyph_index++;
iter->start_index = item->offset + glyphs->log_clusters[glyph_index];
iter->start_char -= g_utf8_strlen (iter->text + iter->start_index,
iter->end_index - iter->start_index);
@@ -303,6 +304,7 @@ _pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter)
if (glyphs->log_clusters[glyph_index] != cluster)
{
+ glyph_index--;
iter->start_index = item->offset + glyphs->log_clusters[glyph_index];
iter->start_char -= g_utf8_strlen (iter->text + iter->start_index,
iter->end_index - iter->start_index);