GutterColor icon indicating copy to clipboard operation
GutterColor copied to clipboard

Wrong lines are colored, and stay colored even after restarting sublime

Open redfellow opened this issue 11 years ago • 9 comments

Not sure as to what actually causes this, but doesn't seem right:

image

redfellow avatar Jul 31 '14 15:07 redfellow

The markers aren't handled very well.. This could be fixed with periodic gutter cleaning or better handling of markers.

jbrooksuk avatar Jul 31 '14 22:07 jbrooksuk

Maybe a good temporary measure would be to provide a command that flushed the markers?

tdhsmith avatar Aug 04 '14 00:08 tdhsmith

Sounds like a plan.

jbrooksuk avatar Aug 04 '14 06:08 jbrooksuk

This could be implemented as part of #44 - the reason for this is that the same command which will clear the gutter on plugin_unloaded could be used as a Palette Command manually.

Currently each marker has a name of gutter_color_%s where %s is the region.a (the first end of the region) value. I don't know if it's possible to iterate all of the regions beginning with gutter_color and then remove them - that's what I'm looking into now.

jbrooksuk avatar Aug 06 '14 06:08 jbrooksuk

Perhaps you could take a look how the VCS Gutter plugin handles this? It's never caused me any issues with wrong things in the gutter.

redfellow avatar Aug 06 '14 10:08 redfellow

I looked at the TrailingSpaces plugin and that solely uses TrailingSpacesMatchedRegion. So I changed GC to do the same but with GutterColorRegion and there didn't seem to be any adverse effects. More testing needs to be done and then I'll be able to get the command in to clear the regions up.

jbrooksuk avatar Aug 07 '14 06:08 jbrooksuk

Oh so we could potentially have many regions using the same region key? That would make removing them much, much easier. :+1:

I was playing with brute-force search and that was way too slow.

tdhsmith avatar Aug 13 '14 22:08 tdhsmith

Yeah, exactly. I was thinking of brute-force myself then remembered that TrailingSpaces only uses one key.

Once the other bits are merged in, I'll swap the region keys to just one constant value, see how it works with the recent changes.

jbrooksuk avatar Aug 14 '14 06:08 jbrooksuk

Wrong lines parsed as with color: 2014-11-25 13-27-13 design css gordio site

gordio avatar Nov 25 '14 11:11 gordio