diff options
author | Havoc Pennington <hp@redhat.com> | 2000-12-11 15:51:20 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-12-11 15:51:20 +0000 |
commit | 310a0d4fcca113f1dbc60feaba406f6b5526df43 (patch) | |
tree | de25976d3423470edd30ab727c6e09f9f774e968 /tests | |
parent | 116853db94f841c81565ecd8cd94302143e3dda8 (diff) | |
download | gdk-pixbuf-310a0d4fcca113f1dbc60feaba406f6b5526df43.tar.gz |
Handle chopping off \r\n and 0x2029 in addition to \n before passing to
2000-12-11 Havoc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
Handle chopping off \r\n and 0x2029 in addition to \n before
passing to PangoLayout
* gtk/gtkimcontextsimple.c
(gtk_im_context_simple_get_preedit_string):
return an empty string if no match is pending
* gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): add
assertion that the returned preedit string was sane
* gtk/gtktext*.[hc], gtk/testtext.c, gtk/testtextbuffer.c:
s/gtk_text_iter_next_char/gtk_text_iter_forward_char/g;
s/gtk_text_iter_prev_char/gtk_text_iter_backward_char/g;
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testtext.c | 6 | ||||
-rw-r--r-- | tests/testtextbuffer.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/testtext.c b/tests/testtext.c index 24cc6b775..6daeebae2 100644 --- a/tests/testtext.c +++ b/tests/testtext.c @@ -1053,8 +1053,8 @@ do_apply_colors (gpointer callback_data, gboolean done = FALSE; next = start; - gtk_text_iter_next_char (&next); - gtk_text_iter_next_char (&next); + gtk_text_iter_forward_char (&next); + gtk_text_iter_forward_char (&next); if (gtk_text_iter_compare (&next, &end) > 0) { @@ -1105,7 +1105,7 @@ dialog_response_callback (GtkWidget *dialog, gint response_id, gpointer data) gtk_text_buffer_get_bounds (buffer, &start, &end); /* Remove trailing newline */ - gtk_text_iter_prev_char (&end); + gtk_text_iter_backward_char (&end); search_string = gtk_text_iter_get_text (&start, &end); diff --git a/tests/testtextbuffer.c b/tests/testtextbuffer.c index e2b307257..e981ce954 100644 --- a/tests/testtextbuffer.c +++ b/tests/testtextbuffer.c @@ -114,7 +114,7 @@ count_toggles_in_buffer (GtkTextBuffer *buffer, { count += count_toggles_at_iter (&iter, of_tag); } - while (gtk_text_iter_next_char (&iter)); + while (gtk_text_iter_forward_char (&iter)); /* Do the end iterator, because forward_char won't return TRUE * on it. @@ -296,7 +296,7 @@ run_tests (GtkTextBuffer *buffer) g_error ("iterators ran out before chars (offset %d of %d)", i, num_chars); - gtk_text_iter_next_char (&iter); + gtk_text_iter_forward_char (&iter); gtk_text_buffer_move_mark (buffer, bar_mark, &iter); @@ -359,14 +359,14 @@ run_tests (GtkTextBuffer *buffer) if (i > 0) { - if (!gtk_text_iter_prev_char (&iter)) + if (!gtk_text_iter_backward_char (&iter)) g_error ("iterators ran out before char indexes"); gtk_text_buffer_move_mark (buffer, bar_mark, &iter); } else { - if (gtk_text_iter_prev_char (&iter)) + if (gtk_text_iter_backward_char (&iter)) g_error ("went backward from 0?"); } |