MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / hasSel

Function hasSel

lib/web/CodeMirror/test/sublime_test.js:50–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 }
49
50 function hasSel() {
51 var ranges = argsToRanges(arguments);
52 return function(cm) {
53 var sels = cm.listSelections();
54 if (sels.length != ranges.length)
55 throw new Failure("Expected " + ranges.length + " selections, but found " + sels.length);
56 for (var i = 0; i < sels.length; i++) {
57 eqCharPos(sels[i].anchor, ranges[i].anchor, "anchor " + i);
58 eqCharPos(sels[i].head, ranges[i].head, "head " + i);
59 }
60 };
61 }
62
63 stTest("bySubword", "the foo_bar DooDahBah \n a FOOBar",
64 "goSubwordLeft", at(0, 0),

Callers 1

sublime_test.jsFile · 0.85

Calls 2

argsToRangesFunction · 0.85
eqCharPosFunction · 0.85

Tested by

no test coverage detected