diff options
author | Havoc Pennington <hp@redhat.com> | 2000-11-14 01:02:05 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-11-14 01:02:05 +0000 |
commit | 8c0b3b59674586d069dba895929f23ee6c9ea91b (patch) | |
tree | 9dfe6171de302592f4b71207439187d10816f75d /pango | |
parent | 4d3301bfb0b7797a09c0a59c65b1a13e76ebf424 (diff) | |
download | pango-8c0b3b59674586d069dba895929f23ee6c9ea91b.tar.gz |
Don't need to check_lines, pango_layout_get_iter() will do that
2000-11-13 Havoc Pennington <hp@redhat.com>
* pango/pango-layout.c (pango_layout_get_cursor_pos): Don't need
to check_lines, pango_layout_get_iter() will do that
(next_cluster_start): don't ever return a value past the end
of the glyph string
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-layout.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 3d6594b4..46ae0231 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -817,7 +817,7 @@ pango_layout_get_line (PangoLayout *layout, pango_layout_check_lines (layout); list_item = g_slist_nth (layout->lines, line); - if(list_item) + if (list_item) return list_item->data; return NULL; } @@ -1415,8 +1415,6 @@ pango_layout_get_cursor_pos (PangoLayout *layout, base_dir = pango_context_get_base_dir (layout->context); - pango_layout_check_lines (layout); - iter = pango_layout_get_iter (layout); /* Find the line */ @@ -3216,7 +3214,7 @@ next_cluster_start (PangoGlyphString *gs, int cluster_start) { int i; - + i = cluster_start + 1; while (i < gs->num_glyphs) { @@ -3226,7 +3224,7 @@ next_cluster_start (PangoGlyphString *gs, ++i; } - return i; + return gs->num_glyphs; } static int |