MCPcopy
hub / github.com/witheve/Eve / selectForInsert

Function selectForInsert

src/codemirror.js:12145–12152  ·  view source on GitHub ↗
(cm, head, height)

Source from the content-addressed store, hash-verified

12143 return base;
12144 }
12145 function selectForInsert(cm, head, height) {
12146 var sel = [];
12147 for (var i = 0; i < height; i++) {
12148 var lineHead = offsetCursor(head, i, 0);
12149 sel.push({anchor: lineHead, head: lineHead});
12150 }
12151 cm.setSelections(sel, 0);
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++) {

Callers 2

VimFunction · 0.85
repeatInsertModeChangesFunction · 0.85

Calls 1

offsetCursorFunction · 0.85

Tested by

no test coverage detected