fix test case, it previously verified incorrect behavior

2001-10-03  Havoc Pennington  <hp@redhat.com>

	* tests/testtextbuffer.c (logical_motion_tests): fix test case,
	it previously verified incorrect behavior

        Fixes for #61565

	* gtk/gtktextiter.c (gtk_text_iter_set_line): don't return lines
	off the end
	(_gtk_text_btree_get_iter_at_line_char): don't return lines off
	the end
	(_gtk_text_btree_get_iter_at_line_byte): don't return lines off
	the end
	(gtk_text_iter_forward_lines): if on the last line, move to end of
	it

	* gtk/gtktextbtree.c (_gtk_text_btree_last_could_contain_tag):
	don't return a line off the end
This commit is contained in:
Havoc Pennington
2001-10-04 00:22:13 +00:00
committed by Havoc Pennington
parent 3c09d348d3
commit 739ffc4934
15 changed files with 279 additions and 119 deletions

View File

@ -544,14 +544,6 @@ Control-Return for #GtkText.)
@editable: the object which received the signal.
<!-- ##### SIGNAL GtkEditable::changed ##### -->
<para>
Indicates that the user has changed the contents
of the widget.
</para>
@editable: the object which received the signal.
<!-- ##### SIGNAL GtkEditable::copy-clipboard ##### -->
<para>
An action signal. Causes the characters in the current selection to
@ -569,42 +561,6 @@ the widget.
@editable: the object which received the signal.
<!-- ##### SIGNAL GtkEditable::delete-text ##### -->
<para>
This signal is emitted when text is deleted from
the widget by the user. The default handler for
this signal will normally be responsible for inserting
the text, so by connecting to this signal and then
stopping the signal with gtk_signal_emit_stop(), it
is possible to modify the inserted text, or prevent
it from being inserted entirely. The @start_pos
and @end_pos parameters are interpreted as for
gtk_editable_delete_text()
</para>
@editable: the object which received the signal.
@start_pos: the starting position.
@end_pos: the end position.
<!-- ##### SIGNAL GtkEditable::insert-text ##### -->
<para>
This signal is emitted when text is inserted into
the widget by the user. The default handler for
this signal will normally be responsible for inserting
the text, so by connecting to this signal and then
stopping the signal with gtk_signal_emit_stop(), it
is possible to modify the inserted text, or prevent
it from being inserted entirely.
</para>
@editable: the object which received the signal.
@new_text: the new text to insert.
@new_text_length: the length of the new text.
@position: the position at which to insert the new text.
this is an in-out paramter. After the signal
emission is finished, it should point after
the newly inserted text.
<!-- ##### SIGNAL GtkEditable::kill-char ##### -->
<para>
An action signal. Delete a single character.
@ -729,6 +685,32 @@ You may not attach these to signals created with the
@data:
@Returns:
<!-- ##### SIGNAL GtkEntry::changed ##### -->
<para>
</para>
@entry: the object which received the signal.
<!-- ##### SIGNAL GtkEntry::delete-text ##### -->
<para>
</para>
@entry: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkEntry::insert-text ##### -->
<para>
</para>
@entry: the object which received the signal.
@arg1:
@arg2:
@arg3:
<!-- ##### ENUM GtkFontFilterType ##### -->
<para>
A set of bit flags used to specify the filter being set
@ -835,6 +817,32 @@ after other user handlers and the default handler.
</para>
<!-- ##### SIGNAL GtkOldEditable::changed ##### -->
<para>
</para>
@oldeditable: the object which received the signal.
<!-- ##### SIGNAL GtkOldEditable::delete-text ##### -->
<para>
</para>
@oldeditable: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkOldEditable::insert-text ##### -->
<para>
</para>
@oldeditable: the object which received the signal.
@arg1:
@arg2:
@arg3:
<!-- ##### ARG GtkPacker:default-border-width ##### -->
<para>

View File

@ -252,3 +252,47 @@ widget or not.
@Returns:
<!-- ##### SIGNAL GtkEditable::changed ##### -->
<para>
Indicates that the user has changed the contents
of the widget.
</para>
@editable: the object which received the signal.
<!-- ##### SIGNAL GtkEditable::delete-text ##### -->
<para>
This signal is emitted when text is deleted from
the widget by the user. The default handler for
this signal will normally be responsible for inserting
the text, so by connecting to this signal and then
stopping the signal with gtk_signal_emit_stop(), it
is possible to modify the inserted text, or prevent
it from being inserted entirely. The @start_pos
and @end_pos parameters are interpreted as for
gtk_editable_delete_text()
</para>
@editable: the object which received the signal.
@start_pos: the starting position.
@end_pos: the end position.
<!-- ##### SIGNAL GtkEditable::insert-text ##### -->
<para>
This signal is emitted when text is inserted into
the widget by the user. The default handler for
this signal will normally be responsible for inserting
the text, so by connecting to this signal and then
stopping the signal with gtk_signal_emit_stop(), it
is possible to modify the inserted text, or prevent
it from being inserted entirely.
</para>
@editable: the object which received the signal.
@new_text: the new text to insert.
@new_text_length: the length of the new text.
@position: the position at which to insert the new text.
this is an in-out paramter. After the signal
emission is finished, it should point after
the newly inserted text.

View File

@ -287,13 +287,6 @@ to fit.
@entry: the object which received the signal.
<!-- ##### SIGNAL GtkEntry::changed ##### -->
<para>
</para>
@entry: the object which received the signal.
<!-- ##### SIGNAL GtkEntry::copy-clipboard ##### -->
<para>
@ -317,15 +310,6 @@ to fit.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkEntry::delete-text ##### -->
<para>
</para>
@entry: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkEntry::insert-at-cursor ##### -->
<para>
@ -334,16 +318,6 @@ to fit.
@entry: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkEntry::insert-text ##### -->
<para>
</para>
@entry: the object which received the signal.
@arg1:
@arg2:
@arg3:
<!-- ##### SIGNAL GtkEntry::move-cursor ##### -->
<para>

View File

@ -58,13 +58,6 @@ GtkOldEditable
@oldeditable: the object which received the signal.
<!-- ##### SIGNAL GtkOldEditable::changed ##### -->
<para>
</para>
@oldeditable: the object which received the signal.
<!-- ##### SIGNAL GtkOldEditable::copy-clipboard ##### -->
<para>
@ -79,25 +72,6 @@ GtkOldEditable
@oldeditable: the object which received the signal.
<!-- ##### SIGNAL GtkOldEditable::delete-text ##### -->
<para>
</para>
@oldeditable: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkOldEditable::insert-text ##### -->
<para>
</para>
@oldeditable: the object which received the signal.
@arg1:
@arg2:
@arg3:
<!-- ##### SIGNAL GtkOldEditable::kill-char ##### -->
<para>