Is findMarks(from, to) supposed to be inclusive?

Currently findMarks seems to be exclusive for the endpoints of the range. I was wondering if this is a bug and findMarks should instead be inclusive?

Without being inclusive, I cannot use this function to find a bookmark that is at the very beginning or end of a document, for example.

If it should be inclusive, I believe the change would be >= to >

  if (!(span.to != null && lineNo == from.line && from.ch > span.to ||
        span.from == null && lineNo != from.line ||
        span.from != null && lineNo == to.line && span.from > to.ch) &&
      (!filter || filter(span.marker)))
    found.push(span.marker.parent || span.marker);

No, it’s intentionally not inclusive, and I don’t want to change that. This is intended to find the active marks at a given position. If you want the marks at a given position, use findMarksAt.

Okay thank you. Maybe consider updating the documentation to be more explicit about this?