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 132826 - Draw whitespace with symbols
Draw whitespace with symbols
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
unspecified
Other Linux
: Normal enhancement
: Medium API
Assigned To: gtk-bugs
gtk-bugs
: 117144 150837 721014 (view as bug list)
Depends on:
Blocks: 721015
 
 
Reported: 2004-01-29 04:07 UTC by Ben Maurer
Modified: 2018-04-15 00:07 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Ben Maurer 2004-01-29 04:07:33 UTC
Most editors have an option to show whitespace. Usually, the whitespace
charactors are rendered in gray. A tab is displayed as ----> (an arrow) and
space as a raised dot.
Comment 1 Jeroen Zwartepoorte 2004-01-30 12:20:02 UTC
I don't know if this is possible. These elements aren't part of the
TextBuffer, so they need to drawn by gktsourceview itself?
Comment 2 Gustavo Giráldez 2004-01-30 22:44:49 UTC
Drawing them in GtkSourceView would be an insane hack :-)  What we
need is support for this in Pango, and that won't be easy.

Comment 3 Paolo Borelli 2004-02-21 13:10:16 UTC
*** Bug 117144 has been marked as a duplicate of this bug. ***
Comment 4 Owen Taylor 2004-08-26 19:04:43 UTC
Doing this in GtkSourceView would indeed be insanely hard. It wouldn't
actually be too hard to do it in GtkTextView ... finding out what characters in
a paragraph are tab characters is pretty easy.

(I assume that the goal here is to preserve the normal spacing for tab
characters and just display an arrow overlayed over the top.)

Related to bug 107560, since you presumably want zero-width characters
to be displayed in visible-whitespace-mode.
Comment 5 Paolo Maggi 2004-09-22 14:43:58 UTC
Moving against gtk+/GtkTextView
Comment 6 Paolo Maggi 2005-01-08 23:32:11 UTC
hmmm... it is not clear to me why it would be "insanely hard" to do in
GtkSourceView but not too hard in GtkTextView.
BTW, I agree this should eventually be a GtkTextView feature, I am only curious.
Comment 7 Ross Golder 2005-08-11 17:02:03 UTC
Still badly missing this feature. If I knew a bit more about what was involved,
I'd be willing to take a look at it. Can anyone give me (or anyone else browsing
this ticket) some advice on what they would do, or where they would start if
they were going to hack on this?
Comment 8 Jeroen Zwartepoorte 2005-08-30 13:15:25 UTC
Take a look at the code for drawing the right margin in GtkSourceView (expose
handler?). The same basic idea can be used for the whitespace markers. 
Comment 9 Yevgen Muntyan 2005-12-06 06:33:39 UTC
Please take a look at moo_text_view_expose() in 
http://svn.berlios.de/viewcvs/ggap/moo/trunk/moo/mooedit/mootextview.c?view=markup . 
It's stupid and simple - just draws tabs and trailing spaces in expose 
handler. It's not a fix or something, of course; but it shows that in worst 
case one can 'just draw them'. 
Comment 10 Paolo Maggi 2006-12-30 17:37:04 UTC
*** Bug 150837 has been marked as a duplicate of this bug. ***
Comment 11 Ignacio Casal Quinteiro (nacho) 2007-07-23 19:55:27 UTC
Are there any new with this feature?
Comment 12 Ignacio Casal Quinteiro (nacho) 2008-11-22 14:08:48 UTC
This is already possible in gtksourceview.
Comment 13 Sébastien Wilmet 2014-08-21 17:18:05 UTC
*** Bug 721014 has been marked as a duplicate of this bug. ***
Comment 14 Matthias Clasen 2018-02-10 04:58:26 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 15 Matthias Clasen 2018-04-15 00:07:11 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new