Versions 145 to 146
Lines 119–128 at 146 (were 119–168 at 145)
122− const insert = (rank: number, text: string, hidden = false): number => {
123− const id = state.sequence.next;
124− state.sequence = sequence.update(state.sequence, { kind: "insert", rank, text });
125− if (hidden) state.sequence = sequence.update(state.sequence, { kind: "visibility", id, delta: 1 });
126− return id;
127− };
131− for (const run of atom.inserts)
132− for (const text of run.lines) {
133− const line = `${atom.id}.${k++}`,
134− n = this.graph.lineN(line),
135− parent = this.graph.parentCodeOf(n);
136− if (n + 1 >= 0x80000000) throw Error("prototype line identity limit");
137− const existing = this.markers.get(state.locator, n + 1);
138− if (existing) {
139− state.sequence = sequence.update(state.sequence, { kind: "visibility", id: existing.enter, delta: -1 });
140− continue;
141− }
142− const parentMarker = this.markers.get(state.locator, this.parentKey(parent));
143− if (!parentMarker) throw Error("missing parent marker");
144− const parentKey = this.parentKey(parent);
145− const index = this.priorities;
146− const root = this.childRoots.get(state.children, parentKey)?.root ?? null;
147− const seq = this.graph.writerSeqOf(n);
148− const key = orderedChildKey({
149− n,
150− replaces: this.graph.replacesN(n) ? 1 : 0,
151− lamport: this.graph.lamportOfSeq(seq),
152− seq,
153− k: this.graph.kOf(n),
154− });
155− const preceding = index.before(root, key);
156− const anchor =
157− preceding === undefined
158− ? parentMarker.enter
159− : required(this.markers.get(state.locator, preceding + 1)).exit;
160− state.children = this.childRoots.set(state.children, parentKey, { root: index.insert(root, key, n) });
161− const at = sequence.rank(state.sequence, anchor) + 1;
162− const enter = insert(at, line),
163− exit = insert(at + 1, `${line}:end`, true);
164− state.locator = this.markers.set(state.locator, n + 1, { kind: "line", enter, exit, parentKey, key });
165− }
125+ for (const run of atom.inserts) for (const _ of run.lines) this.insertLine(state, `${atom.id}.${k++}`);
Lines 139–184 at 146 (were 179–184 at 145)
149+ if (hidden) state.sequence = sequence.update(state.sequence, { kind: "visibility", id, delta: 1 });
157+ state.sequence = sequence.update(state.sequence, { kind: "visibility", id: existing.enter, delta: -1 });
175+ preceding === undefined ? parentMarker.enter : required(this.markers.get(state.locator, preceding + 1)).exit;
176+ state.children = this.childRoots.set(state.children, parentKey, { root: index.insert(root, key, n) });
180+ state.locator = this.markers.set(state.locator, n + 1, { kind: "line", enter, exit, parentKey, key });
- MCP
- compare on this site's /mcp
- CLI
- abso diff 145 146 src/engine/experimental/projection-marker.ts --json
- JSON
- /christopher/abso-core/compare/145..146?file=src%2Fengine%2Fexperimental%2Fprojection-marker.ts&format=json