(e)
| 9331 | }); |
| 9332 | |
| 9333 | function prepareCopyCut(e) { |
| 9334 | if (signalDOMEvent(cm, e)) { return } |
| 9335 | if (cm.somethingSelected()) { |
| 9336 | setLastCopied({lineWise: false, text: cm.getSelections()}); |
| 9337 | } else if (!cm.options.lineWiseCopyCut) { |
| 9338 | return |
| 9339 | } else { |
| 9340 | var ranges = copyableRanges(cm); |
| 9341 | setLastCopied({lineWise: true, text: ranges.text}); |
| 9342 | if (e.type == "cut") { |
| 9343 | cm.setSelections(ranges.ranges, null, sel_dontScroll); |
| 9344 | } else { |
| 9345 | input.prevInput = ""; |
| 9346 | te.value = ranges.text.join("\n"); |
| 9347 | selectInput(te); |
| 9348 | } |
| 9349 | } |
| 9350 | if (e.type == "cut") { cm.state.cutIncoming = +new Date; } |
| 9351 | } |
| 9352 | on(te, "cut", prepareCopyCut); |
| 9353 | on(te, "copy", prepareCopyCut); |
| 9354 |
nothing calls this directly
no test coverage detected