this function was broken if called on the first position in the buffer.

2001-01-05  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c (gtk_text_iter_ends_line): this function was
	broken if called on the first position in the buffer.

	* gtk/gtktextlayout.c (line_display_index_to_iter): fix
	forward_to_delimiters to be called only if we aren't already at
	the delimiters.
This commit is contained in:
Havoc Pennington 2001-01-05 19:51:55 +00:00 committed by Havoc Pennington
parent 93d87eb0f4
commit 1299c1df6f
9 changed files with 67 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2001-01-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_ends_line): this function was
broken if called on the first position in the buffer.
* gtk/gtktextlayout.c (line_display_index_to_iter): fix
forward_to_delimiters to be called only if we aren't already at
the delimiters.
2001-01-05 Havoc Pennington <hp@redhat.com>
* demos/gtk-demo/main.c (create_tree): Oops, that didn't link. Fix.

View File

@ -1,3 +1,12 @@
2001-01-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_ends_line): this function was
broken if called on the first position in the buffer.
* gtk/gtktextlayout.c (line_display_index_to_iter): fix
forward_to_delimiters to be called only if we aren't already at
the delimiters.
2001-01-05 Havoc Pennington <hp@redhat.com>
* demos/gtk-demo/main.c (create_tree): Oops, that didn't link. Fix.

View File

@ -1,3 +1,12 @@
2001-01-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_ends_line): this function was
broken if called on the first position in the buffer.
* gtk/gtktextlayout.c (line_display_index_to_iter): fix
forward_to_delimiters to be called only if we aren't already at
the delimiters.
2001-01-05 Havoc Pennington <hp@redhat.com>
* demos/gtk-demo/main.c (create_tree): Oops, that didn't link. Fix.

View File

@ -1,3 +1,12 @@
2001-01-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_ends_line): this function was
broken if called on the first position in the buffer.
* gtk/gtktextlayout.c (line_display_index_to_iter): fix
forward_to_delimiters to be called only if we aren't already at
the delimiters.
2001-01-05 Havoc Pennington <hp@redhat.com>
* demos/gtk-demo/main.c (create_tree): Oops, that didn't link. Fix.

View File

@ -1,3 +1,12 @@
2001-01-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_ends_line): this function was
broken if called on the first position in the buffer.
* gtk/gtktextlayout.c (line_display_index_to_iter): fix
forward_to_delimiters to be called only if we aren't already at
the delimiters.
2001-01-05 Havoc Pennington <hp@redhat.com>
* demos/gtk-demo/main.c (create_tree): Oops, that didn't link. Fix.

View File

@ -1,3 +1,12 @@
2001-01-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_ends_line): this function was
broken if called on the first position in the buffer.
* gtk/gtktextlayout.c (line_display_index_to_iter): fix
forward_to_delimiters to be called only if we aren't already at
the delimiters.
2001-01-05 Havoc Pennington <hp@redhat.com>
* demos/gtk-demo/main.c (create_tree): Oops, that didn't link. Fix.

View File

@ -1,3 +1,12 @@
2001-01-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_ends_line): this function was
broken if called on the first position in the buffer.
* gtk/gtktextlayout.c (line_display_index_to_iter): fix
forward_to_delimiters to be called only if we aren't already at
the delimiters.
2001-01-05 Havoc Pennington <hp@redhat.com>
* demos/gtk-demo/main.c (create_tree): Oops, that didn't link. Fix.

View File

@ -1366,7 +1366,7 @@ gtk_text_iter_ends_line (const GtkTextIter *iter)
*/
GtkTextIter tmp = *iter;
if (!gtk_text_iter_backward_char (&tmp))
return FALSE;
return TRUE;
return gtk_text_iter_get_char (&tmp) != '\r';
}

View File

@ -1954,7 +1954,9 @@ line_display_index_to_iter (GtkTextLayout *layout,
_gtk_text_btree_get_iter_at_line (_gtk_text_buffer_get_btree (layout->buffer),
iter, display->line, 0);
gtk_text_iter_forward_to_delimiters (iter);
if (!gtk_text_iter_ends_line (iter))
gtk_text_iter_forward_to_delimiters (iter);
}
/* FIXME should this be cursor positions? */