don't back up a char from the end iterator, fixes #61859 ("can't put
2001-10-22 Havoc Pennington <hp@redhat.com> * gtk/gtktextbuffer.c (gtk_text_buffer_place_cursor): don't back up a char from the end iterator, fixes #61859 ("can't put cursor at the end of the buffer") * gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end): fix this to work with delimiters other than newline. * tests/testtextbuffer.c: add some tests for get_chars_in_line, get_bytes_in_line * gtk/gtktextiter.c (gtk_text_iter_get_chars_in_line): fix for the last line, since the newline is no longer counted. (gtk_text_iter_get_bytes_in_line): ditto
This commit is contained in:
committed by
Havoc Pennington
parent
60ef9dd421
commit
0d5635b366
@ -1866,9 +1866,6 @@ gtk_text_buffer_place_cursor (GtkTextBuffer *buffer,
|
||||
|
||||
real = *where;
|
||||
|
||||
if (gtk_text_iter_is_end (&real))
|
||||
gtk_text_iter_backward_char (&real);
|
||||
|
||||
_gtk_text_btree_place_cursor (get_btree (buffer), &real);
|
||||
gtk_text_buffer_mark_set (buffer, &real,
|
||||
gtk_text_buffer_get_mark (buffer,
|
||||
|
||||
Reference in New Issue
Block a user