summaryrefslogtreecommitdiff
path: root/gtk/gtktextbuffer.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-10-03 20:49:10 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-10-03 20:49:10 +0000
commit77dc57e96019d5badb9292e03edead804bc6d8ec (patch)
treeb09e52896aa8ccb0462e8b1e7bc107cb7ebae9db /gtk/gtktextbuffer.c
parent264afe83f81f4654e3c22f03fa6d5ec907e80321 (diff)
downloadgdk-pixbuf-77dc57e96019d5badb9292e03edead804bc6d8ec.tar.gz
allow testing the end position
2001-10-03 Havoc Pennington <hp@redhat.com> * gtk/gtktextiter.c (test_log_attrs): allow testing the end position * gtk/gtktextbuffer.c (compute_log_attrs): update for pango changes * tests/testtextbuffer.c (logical_motion_tests): updates
Diffstat (limited to 'gtk/gtktextbuffer.c')
-rw-r--r--gtk/gtktextbuffer.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index 12d8eeb27..ec2ded7e4 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -3419,11 +3419,15 @@ compute_log_attrs (const GtkTextIter *iter,
if (char_lenp)
*char_lenp = char_len;
- attrs = g_new (PangoLogAttr, char_len);
-
+ attrs = g_new (PangoLogAttr, char_len + 1);
+
+ /* FIXME we need to follow PangoLayout and allow different language
+ * tags within the paragraph
+ */
pango_get_log_attrs (paragraph, byte_len, -1,
gtk_text_iter_get_language (&start),
- attrs);
+ attrs,
+ char_len + 1);
g_free (paragraph);