GNOME Bugzilla – Bug 611060
Invisible newlines aren't always invisible
Last modified: 2013-03-28 18:11:04 UTC
Hello, If the content of a text buffer is: line 1<tag><br>line 2<br></tag>line 3 Where <br> is a "\n" char and tag has invisible=True, what is displayed is: line1 line3 instead of: line1line3 as I would expect (since both newlines should be invisible). To reproduce, run this: ====================== import gtk w = gtk.Window() tv = gtk.TextView() w.add(tv) tb = tv.get_buffer() tag = tb.create_tag('invisible') tag.props.invisible = True tb.insert(tb.get_start_iter(), "line 1\nline 2\nline 3") start_hide = tb.get_iter_at_offset(6) end_hide = tb.get_iter_at_offset(14) tb.apply_tag(tag, start_hide, end_hide) w.show_all() gtk.main() ======================
*** This bug has been marked as a duplicate of bug 597798 ***