textiter: fix bug in gtk_text_iter_backward_line()
gtk_text_iter_backward_line() checks the value of real->line_char_offset without previously calling ensure_char_offsets (real) to make sure the former is up-to-date. As a consequence of this, when gtk_text_iter_backward_line() is called after a gtk_text_buffer_insert_range() in the first line of buffer, the iter is not moved to the start of the line, and the return value is wrong. Fixed by adding the ensure_char_offsets() call.
This commit is contained in:
committed by
Daniel Boles
parent
7df629dccf
commit
f680ce1f43
@@ -2547,6 +2547,8 @@ gtk_text_iter_backward_line (GtkTextIter *iter)
|
||||
if (real == NULL)
|
||||
return FALSE;
|
||||
|
||||
ensure_char_offsets (real);
|
||||
|
||||
check_invariants (iter);
|
||||
|
||||
new_line = _gtk_text_line_previous (real->line);
|
||||
|
||||
Reference in New Issue
Block a user