getting gutter marks

Using a similar approach as your breakpoint demo, how can I get all the guttermarks from the ‘breakpoint’ gutter?

I am wanting to save these and reapply when the document opens.

Thank you

And so you know, I have tried:

var doc = cm.getDoc();
var marks = doc.getAllMarks();

But marks remains [] (empty) no matter how many breakpoints I set.

The lineInfo method will give you information about the gutter marks for a given line.

I need ‘all’ marks, so you’re saying my best approach is to loop through all lines?

Yes, or keep your own data structure when you set the marks.

Sorry for reviving this issue, but CM6 no longer offers lineInfo method (afaik), is there any way to get all the gutters from the state?

1 Like

If the gutter you’re interested in is created by your own code, provide some gutter-specific way to access its marker set.

1 Like