MCPcopy Create free account
hub / github.com/breck7/scroll / copyableRanges

Function copyableRanges

external/.scrollLibs.js:11245–11255  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

11243 }
11244
11245 function copyableRanges(cm) {
11246 var text = [],
11247 ranges = []
11248 for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
11249 var line = cm.doc.sel.ranges[i].head.line
11250 var lineRange = { anchor: Pos(line, 0), head: Pos(line + 1, 0) }
11251 ranges.push(lineRange)
11252 text.push(cm.getRange(lineRange.anchor, lineRange.head))
11253 }
11254 return { text: text, ranges: ranges }
11255 }
11256
11257 function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {
11258 field.setAttribute("autocorrect", !!autocorrect)

Callers 2

onCopyCutFunction · 0.85
prepareCopyCutFunction · 0.85

Calls 1

PosFunction · 0.85

Tested by

no test coverage detected