MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / apply

Function apply

docs/components/editor.js:240–245  ·  view source on GitHub ↗
(result)

Source from the content-addressed store, hash-verified

238 };
239
240 const apply = (result) => {
241 if (!result) return false;
242 writeAndRestore(result.text, result.caretStart ?? result.caret, result.caretEnd ?? result.caret);
243 autoPairCaret = result.autoPair ?? -1;
244 return true;
245 };
246
247 // Insert plain text at caret, replacing any selection; used by paste/drop after normalisation. Enforces `MAX_LINES`.
248 const insertAtCaret = (str) => {

Callers 1

createEditorFunction · 0.70

Calls 1

writeAndRestoreFunction · 0.85

Tested by

no test coverage detected