Toggle Bookmark

Aug 20, 2008 at 8:57 PM
I don't know if this is helpful or not, but the toggle bookmark feature in Scide doesn't really toggle at all but just add the bookmark. I changed it to the code below to actually toggle it.

if (ActiveDocument.Scintilla.Markers.GetMarkerMask(ActiveDocument.Scintilla.Lines.Current) == 0) {
    ActiveDocument.Scintilla.Lines.Current.AddMarker(0);
} else {
    ActiveDocument.Scintilla.Lines.Current.DeleteMarker(0);
}
Coordinator
Aug 21, 2008 at 2:39 AM
I tweaked the code slightly to cache Lines.Current and committed it to changeset 37120

Line currentLine = ActiveDocument.Scintilla.Lines.Current;
if (ActiveDocument.Scintilla.Markers.GetMarkerMask(currentLine) == 0)
{
    currentLine.AddMarker(0);
}
else
{
    currentLine.DeleteMarker(0);
}

It's great to see someone having an understanding of a more advanced feature and figuring out how to use it with the new API!