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

Function paste

lib/web/kill.js:58–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56}
57
58function paste() {
59 _field.log("about to paste");
60 var newText = getNewClipboard(function (newText) {
61 _field.log("in continuation");
62 if (newText != null)
63 addToRing(newText);
64
65 var start = cm.getCursor();
66 cm.replaceRange(getFromRing(0), cm.getCursor("start"), cm.getCursor("end"), "paste");
67 cm.setSelection(cm.getCursor("end"), cm.getCursor("end"));
68 })
69}
70
71function pasteAgain() {
72 cm.replaceSelection(popFromRing(), "around", "paste");

Callers 1

instantiate.jsFile · 0.85

Calls 5

getNewClipboardFunction · 0.85
logMethod · 0.80
replaceRangeMethod · 0.80
addToRingFunction · 0.70
getFromRingFunction · 0.70

Tested by

no test coverage detected