After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 611060 - Invisible newlines aren't always invisible
Invisible newlines aren't always invisible
Status: RESOLVED DUPLICATE of bug 597798
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.18.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-02-25 10:58 UTC by Noam Yorav-Raphael
Modified: 2013-03-28 18:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Noam Yorav-Raphael 2010-02-25 10:58:15 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()
======================
Comment 1 Sébastien Wilmet 2013-03-28 18:11:04 UTC

*** This bug has been marked as a duplicate of bug 597798 ***