• Sébastien Wilmet's avatar
    Simplify _gtk_text_buffer_get_line_log_attrs() · 706c8e9c
    Sébastien Wilmet authored
    NULL was returned in case of an empty last line. Every users needed to
    special-case this. Now it will return the expected result: char_len of 0
    with one PangoLogAttr.
    In compute_log_attrs(), 'paragraph' will be the empty string "" with
    'char_len' == 0.
    pango_get_log_attrs() works fine with an empty string, it will return
    one correct PangoLogAttr (because there is one text position for the
    empty string).
    It fixes the unit tests for gtk_text_iter_is_cursor_position().
gtktextiter.c 155 KB