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

Function selectForInsert

lib/web/CodeMirror/keymap/vim.js:3090–3097  ·  view source on GitHub ↗
(cm, head, height)

Source from the content-addressed store, hash-verified

3088 return base;
3089 }
3090 function selectForInsert(cm, head, height) {
3091 var sel = [];
3092 for (var i = 0; i < height; i++) {
3093 var lineHead = offsetCursor(head, i, 0);
3094 sel.push({anchor: lineHead, head: lineHead});
3095 }
3096 cm.setSelections(sel, 0);
3097 }
3098 // getIndex returns the index of the cursor in the selections.
3099 function getIndex(ranges, cursor, end) {
3100 for (var i = 0; i < ranges.length; i++) {

Callers 2

VimFunction · 0.85
repeatInsertModeChangesFunction · 0.85

Calls 2

offsetCursorFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected