You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Circle in gutter persists after removing breakpoint (even after removing package) #9
changed the title [-]Circle in gutter persists after removing breakpoint[/-][+]Circle in gutter persists after removing breakpoint (even after removing package)[/+]on Jan 4, 2016
It means you've removed the breakpoint by deleting the line instead of using the Toggle breakpoint command. I did some experiments and haven't found a way to remove such orphaned gutter icon programmatically, it appears to be the issue with ST and not with the plugin.
The gutter icon is a named "region" in ST's terms. Since you've deleted the breakpoint, the name of the region is now lost. I haven't found an API that allows searching for region names. If you knew the name you could've deleted it, but since the name is lost there's no programmatic way of doing it.
@obormot let me get this straight. Are you telling me I need to remove Sublime completely from my system and then re-install it, to undo something your package did?
Ahem... what?! Your issue was not caused by the plugin. The plugin calls ST API to add and remove the gutter icon correctly. By killing the breakpoint incorrectly you've created an orphaned named region that is now unknown to the plugin. Blaming the plugin for this isn't right.
Have you tried restarting the editor? ST documentation says that sublime.PERSISTENT flag saves the regions in the session. Also, have you tried renaming the file, or doing any other trick so that ST "forgets" the association of this gutter icon and your file.
Restarting Sublime was the first thing I checked, and it doesn't work. What does work is closing and re-opening the file (each file with this issue), which I thought of doing thanks to your above comment. I would've guessed closing ST was equivalent to closing the file, obviously it is not.
Your plugin is great, but the issue is definitely caused by it. It'd be silly to say "ST created this problem" when it was clearly using the plugin what did.
If you ask me, this should be added to the 'Caveats' section of the README.
The gutter icon is a named "region" in ST's terms. Since you've deleted the breakpoint, the name of the region is now lost.
The name is lost to the plugin?
How are the names being stored/found?
If ST knows the name and the plugin does not, all that really needs to be done is find a way to fill that knowledge gap. Maybe store these region names somehow?
@hyatt-e if you look at STs API reference, there's literally no way to list/find regions in the file https://www.sublimetext.com/docs/3/api_reference.html
I don't know how and where ST internally stores the regions
There's probably a way to redesign this but I couldn't find a straightforward method using the ST API. This issue is annoying and I tried to hack it but had zero luck with existing API.
Activity
[-]Circle in gutter persists after removing breakpoint[/-][+]Circle in gutter persists after removing breakpoint (even after removing package)[/+]obormot commentedon Jan 6, 2016
It means you've removed the breakpoint by deleting the line instead of using the Toggle breakpoint command. I did some experiments and haven't found a way to remove such orphaned gutter icon programmatically, it appears to be the issue with ST and not with the plugin.
Gabriel-p commentedon Jan 6, 2016
OK, but how do I remove the left-over gutter icons programmatically or not?
I've tried adding a BP on the same line and then removing it with the toggle, but the icons are still there.
What do I need to modify/delete/add to whatever file to make those icons go away?
obormot commentedon Jan 7, 2016
The gutter icon is a named "region" in ST's terms. Since you've deleted the breakpoint, the name of the region is now lost. I haven't found an API that allows searching for region names. If you knew the name you could've deleted it, but since the name is lost there's no programmatic way of doing it.
Gabriel-p commentedon Jan 7, 2016
@obormot let me get this straight. Are you telling me I need to remove Sublime completely from my system and then re-install it, to undo something your package did?
Please tell me this isn't true.
obormot commentedon Jan 7, 2016
Ahem... what?! Your issue was not caused by the plugin. The plugin calls ST API to add and remove the gutter icon correctly. By killing the breakpoint incorrectly you've created an orphaned named region that is now unknown to the plugin. Blaming the plugin for this isn't right.
Have you tried restarting the editor? ST documentation says that sublime.PERSISTENT flag saves the regions in the session. Also, have you tried renaming the file, or doing any other trick so that ST "forgets" the association of this gutter icon and your file.
Gabriel-p commentedon Jan 7, 2016
Restarting Sublime was the first thing I checked, and it doesn't work. What does work is closing and re-opening the file (each file with this issue), which I thought of doing thanks to your above comment. I would've guessed closing ST was equivalent to closing the file, obviously it is not.
Your plugin is great, but the issue is definitely caused by it. It'd be silly to say "ST created this problem" when it was clearly using the plugin what did.
If you ask me, this should be added to the 'Caveats' section of the README.
Thanks again.
obormot commentedon Jan 7, 2016
No problem. I will add this to Caveats in the next release.
hyatt-e commentedon Jan 29, 2019
There must be a way around this...
@obormot
The name is lost to the plugin?
How are the names being stored/found?
If ST knows the name and the plugin does not, all that really needs to be done is find a way to fill that knowledge gap. Maybe store these region names somehow?
Can you provide more info about the issue?
obormot commentedon Feb 10, 2019
@hyatt-e if you look at STs API reference, there's literally no way to list/find regions in the file
https://www.sublimetext.com/docs/3/api_reference.html
I don't know how and where ST internally stores the regions
There's probably a way to redesign this but I couldn't find a straightforward method using the ST API. This issue is annoying and I tried to hack it but had zero luck with existing API.