Commit 1299c1df authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

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.
parent 93d87eb0
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.
......
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.
......
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.
......
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.
......
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.
......
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.
......
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.
......
......@@ -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';
}
......
......@@ -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? */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment