MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / update

Function update

src/sidebarApps/searchInFiles/cmResultView.js:33–46  ·  view source on GitHub ↗
(value, tr)

Source from the content-addressed store, hash-verified

31 return new Set();
32 },
33 update(value, tr) {
34 let next = value;
35 for (const e of tr.effects) {
36 if (e.is(toggleFold)) {
37 if (next === value) next = new Set(value);
38 const ln = e.value;
39 if (next.has(ln)) next.delete(ln);
40 else next.add(ln);
41 }
42 }
43 // Reset folds on full document reset
44 if (tr.docChanged && tr.startState.doc.length === 0) return new Set();
45 return next;
46 },
47 });
48
49 function eachGroup(doc, fn) {

Callers

nothing calls this directly

Calls 3

buildGroupDecosFunction · 0.85
addMethod · 0.80
deleteMethod · 0.65

Tested by

no test coverage detected