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 686116 - Right margin only appears in the first tab
Right margin only appears in the first tab
Status: RESOLVED DUPLICATE of bug 675785
Product: gedit
Classification: Applications
Component: general
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-14 17:30 UTC by Jean-Philippe Fleury
Modified: 2013-01-26 09:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
possible fix (821 bytes, patch)
2013-01-25 17:42 UTC, Edward Sheldrake
none Details | Review

Description Jean-Philippe Fleury 2012-10-14 17:30:25 UTC
With gedit 3.6.0, I display a right margin at column 80. When I open gedit, the right margin is displayed in the default empty document, but for any new document, the right margin is hidden.

Tested with the default Adwaita theme and some other themes.
Comment 1 Edward Sheldrake 2012-10-22 18:03:37 UTC
It's a bit weird, but I don't think the right margin only works in the first tab. Instead the bug seems to be: if I open more than one file at a time from a terminal or Files (nautilus), the right margin is displayed in all except the first file.
Comment 2 Jean-Philippe Fleury 2012-10-22 19:03:22 UTC
Personally, I can confirm that the bug that I encounter is really that the right margin is only displayed in the first tab:

- I open gedit.

- By default, an empty new document is opened. The right margin is displayed.

- I open a new document, so a new tab.

- There's no right margin in this new tab (and in all subsequent tabs).
Comment 3 Edward Sheldrake 2012-11-07 19:00:43 UTC
The right margin appears properly in other colour schemes (see gedit preferences) such as Tango, but not in the Classic scheme.

I added a g_printf at the top of gtk_source_view_paint_right_margin to print the right margin colour - the colour is rgba(255,255,255,0.15686274509803921) when the right margin isn't displayed, so it's not visible because it's being drawn as white on white.

Other colour schemes specify a right margin colour, but with Classic, there's no colour set, so gtksourceview reads a colour from the GTK+ theme.

Possibly the bug is in gtksourceview not gedit.
Comment 4 Ivan Baldo 2012-11-09 20:05:21 UTC
I found a workaround: when you need the margin in some file then temporarily change the GEdit theme, just put another theme, then select again the theme you like and thats it!, it fixes the right margin for all files currently opened.
There is no need to exit the dialog neither, just swapping the theme works.
Comment 5 femiveys 2012-11-19 21:09:31 UTC
I confirm the workaround works, but this is a very annoying bug. When wil this bug officially be confirmed?
Comment 6 Ignacio Casal Quinteiro (nacho) 2013-01-24 09:57:35 UTC
Is this happening with gedit classic theme color? Are you all using a specific distribution?

Here with gedit 3.6.x and fedora 18 does not happen.
Comment 7 Jacobo Aragunde Pérez 2013-01-24 10:41:38 UTC
(In reply to comment #6)
> Is this happening with gedit classic theme color? Are you all using a specific
> distribution?
> 
> Here with gedit 3.6.x and fedora 18 does not happen.

I'm using gedit 3.6.2 in F18 and it's happening. I use the classical theme.

As mentioned above, if you change the theme the right margin appears for all the tabs you have already open. But if you open one more document, the new tab doesn't have the margin.
Comment 8 Ignacio Casal Quinteiro (nacho) 2013-01-24 10:45:29 UTC
O_o indeed this seems to happen with the classic theme...
Comment 9 Ignacio Casal Quinteiro (nacho) 2013-01-24 10:56:26 UTC
OK so I just quickly checked and this is an adwaita problem. The classic theme relies on the "background" color of the text view to draw the gutter and the right margin. Right now the color is white so both the gutter and the right margin are drawn in white so you can't actually see the right margin.
Comment 10 Sébastien Wilmet 2013-01-24 13:11:53 UTC
So it's the same root problem as bug #675785.
Comment 11 Edward Sheldrake 2013-01-24 16:44:13 UTC
The problem isn't that the color is white, the problem is that gtksourceview doesn't read the color from the gtk theme reliably.

e.g. if you do "gedit file1.txt file2.txt" you'll see the right margin in the second tab but not the first.
Comment 12 Ignacio Casal Quinteiro (nacho) 2013-01-25 13:45:52 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 675785 ***
Comment 13 Edward Sheldrake 2013-01-25 17:42:55 UTC
Created attachment 234431 [details] [review]
possible fix

I didn't think this is the same as #675785 although it could be fixed in the same way by just setting a color in the gtksourceview style scheme.
Comment 14 Ignacio Casal Quinteiro (nacho) 2013-01-25 18:50:22 UTC
Comment on attachment 234431 [details] [review]
possible fix

Not sure I understand this patch. Why would this change anything? If the right marging is white it will be white anyway... or am I missing anything here?
Comment 15 Edward Sheldrake 2013-01-26 09:46:59 UTC
I must be the only person who ever opens two or more files at the same time (on one command line). If you open 3 tabs at the same time by doing:

$ gedit 1 2 3

you will see the right margin in tabs 2 and 3 but not tab 1.
Comment 16 Ignacio Casal Quinteiro (nacho) 2013-01-26 09:58:49 UTC
The main problem here is that all gedit maintainers are using the dark colors, so we didn't realized of this problem. But we are fixing it right now so expect a solution in a few hours.