code: function compareCollapsedMarkers(a, b) {
      var lenDiff = a.lines.length - b.lines.length;
      if (lenDiff != 0) return lenDiff;
      var aPos = a.find(), bPos = b.find();
      var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);
      if (fromCmp) return -fromCmp;
      var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);
      if (toCmp) return toCmp;
      return b.id - a.id;
    }
docs: Returns a number indicating which of two overlapping collapsed spans is larger (and thus includes the other). Falls back to comparing ids when the spans cover exactly the same range.