(cm)
| 2 | namespace = "multi_"; |
| 3 | |
| 4 | function hasSelections(cm) { |
| 5 | var sels = cm.listSelections(); |
| 6 | var given = (arguments.length - 1) / 4; |
| 7 | if (sels.length != given) |
| 8 | throw new Failure("expected " + given + " selections, found " + sels.length); |
| 9 | for (var i = 0, p = 1; i < given; i++, p += 4) { |
| 10 | var anchor = Pos(arguments[p], arguments[p + 1]); |
| 11 | var head = Pos(arguments[p + 2], arguments[p + 3]); |
| 12 | eqCharPos(sels[i].anchor, anchor, "anchor of selection " + i); |
| 13 | eqCharPos(sels[i].head, head, "head of selection " + i); |
| 14 | } |
| 15 | } |
| 16 | function hasCursors(cm) { |
| 17 | var sels = cm.listSelections(); |
| 18 | var given = (arguments.length - 1) / 2; |
no test coverage detected