MCPcopy Index your code
hub / github.com/witheve/Eve / getIndex

Function getIndex

src/codemirror.js:12154–12163  ·  view source on GitHub ↗
(ranges, cursor, end)

Source from the content-addressed store, hash-verified

12152 }
12153 // getIndex returns the index of the cursor in the selections.
12154 function getIndex(ranges, cursor, end) {
12155 for (var i = 0; i < ranges.length; i++) {
12156 var atAnchor = end != 'head' && cursorEqual(ranges[i].anchor, cursor);
12157 var atHead = end != 'anchor' && cursorEqual(ranges[i].head, cursor);
12158 if (atAnchor || atHead) {
12159 return i;
12160 }
12161 }
12162 return -1;
12163 }
12164 function getSelectedAreaRange(cm, vim) {
12165 var lastSelection = vim.lastSelection;
12166 var getCurrentSelectedAreaRange = function() {

Callers 1

selectBlockFunction · 0.85

Calls 1

cursorEqualFunction · 0.85

Tested by

no test coverage detected