+51

Invisible tabs row, icons on the gutter

Aleksandr Gornostal 12 years ago updated by Matthew Wild 12 years ago 4

Image 176


When plugin uses add_regions API, sometimes tabs row or icons on the gutter (or both) disappear.

This bug was detected among the majority of Sublime versions and on all platforms.

Unfortunately it appears randomly. I can't tell how to reproduce it except using plugins that draw icons on the gutter (like Modific).

+2

Changing color theme reproducibly helps.

Same problem here.

Same issue here, I have the following installed: Package Control, CTags, DocBLockr, Modific, SublimeLinter, ColorPicker, Goto Documentation, HTMLAttributes, SublimeTODO (although the issue only began once Modific was installed, you can see there is already discussion on their github site). I've done some testing and I seem to be able to reliably reproduce the issue. Below are some situations and what happens, note that in each case I had two files/tabs open, one of the files caused the issue, the other did not - that is, when I was focused on one file things were fine, and when focused on the other file things were broken. Both files contain uncommitted changes and were similar in nature.


  1. Start ST2 in non-working scheme (Monokai) then switch to working scheme (Blackboard) and everything is fine in second scheme (but not first one when I switch back).
  2. Start ST2 in working scheme (Blackboard) and then switch to non-working scheme (Monokai) and BOTH schemes work fine (even after switching back and forth).
  3. Copy "diff.*" <dict> entries from non-working scheme (Monokai) to working scheme (Blackboard); afterward neither scheme works properly, however using a third scheme (Twilight) and I can reproduce situations (1) and (2).

My guess is that there is some specific value in the color scheme that is doing this. When I add the diff.* values to Blackboard the gutter dots have appropriate colors (otherwise the dots are there, but all the same color). Note that when I add the same diff.* <dict> elements to Twilight that color scheme does NOT break, but the gutter dots do not change color.


The <dict> entries I copied:


<dict>
<key>name</key>
<string>diff.header</string>
<key>scope</key>
<string>meta.diff, meta.diff.header</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#75715E</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>diff.deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#F92672</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>diff.inserted</string>
<key>scope</key>
<string>markup.inserted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#A6E22E</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>diff.changed</string>
<key>scope</key>
<string>markup.changed</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#E6DB74</string>
</dict>
</dict>


Let me know what other info I can provide. I will also post this on the ST2 bug tracker.


>>> sublime.version()
u'2217'
>>> import sys
>>> sys.version
'2.6.6 (r266:84292, Jun 16 2011, 22:35:51) \n[GCC 4.4.5]'

I encountered this issue in a plugin I developed myself. It seems to be related to calling add_regions() multiple times in succession. Adding a delay (~1s) between calls makes it less likely to happen.