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

Function copyableRanges

src/codemirror.js:1185–1194  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

1183 }
1184
1185 function copyableRanges(cm) {
1186 var text = [], ranges = [];
1187 for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
1188 var line = cm.doc.sel.ranges[i].head.line;
1189 var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
1190 ranges.push(lineRange);
1191 text.push(cm.getRange(lineRange.anchor, lineRange.head));
1192 }
1193 return {text: text, ranges: ranges};
1194 }
1195
1196 function disableBrowserMagic(field) {
1197 field.setAttribute("autocorrect", "off");

Callers 2

prepareCopyCutFunction · 0.85
onCopyCutFunction · 0.85

Calls 1

getRangeMethod · 0.80

Tested by

no test coverage detected