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;
This commit is contained in:
Havoc Pennington
2000-12-11 15:51:20 +00:00
committed by Havoc Pennington
parent 116853db94
commit 310a0d4fcc
20 changed files with 207 additions and 59 deletions

View File

@ -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?");
}