Skip to content
  • Nelson Benítez León's avatar
    textiter: fix bug in gtk_text_iter_backward_line() · c4874aea
    Nelson Benítez León authored
    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.
    
    A test case for this bug is added to the textiter gtk testsuite.
    c4874aea