{"draft":null,"from":137,"to":138,"files":[{"path":"src/engine/view.ts","added":34,"removed":0,"diff":"--- a/src/engine/view.ts\n+++ b/src/engine/view.ts\n@@ -561,6 +561,40 @@\n \t\treturn out;\n \t}\n \n+\t/** Two visible neighbours without retaining the file's historical sequence. */\n+\tvisibleNeighbours(path: string, line: LineId): LineId[] {\n+\t\tconst graph = this.graph;\n+\t\tconst target = graph.lineN(line);\n+\t\tconst start = graph.startCodeOf(path);\n+\t\tif (target < 0 || start === undefined) return [];\n+\t\tconst scan = (nodes: Iterable<number>): LineId[] => {\n+\t\t\tlet previous: LineId | undefined;\n+\t\t\tlet found = false;\n+\t\t\tfor (const n of nodes) {\n+\t\t\t\tif (n === target) {\n+\t\t\t\t\tfound = true;\n+\t\t\t\t\tcontinue;\n+\t\t\t\t}\n+\t\t\t\tlet deleted = false;\n+\t\t\t\tfor (const seq of graph.eachDeleterSeqOf(n))\n+\t\t\t\t\tif (this.#has(seq)) {\n+\t\t\t\t\t\tdeleted = true;\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\t\t\t\tif (deleted) continue;\n+\t\t\t\tconst id = graph.lineIdOf(n);\n+\t\t\t\tif (found) return previous === undefined ? [id] : [previous, id];\n+\t\t\t\tprevious = id;\n+\t\t\t}\n+\t\t\treturn found && previous !== undefined ? [previous] : [];\n+\t\t};\n+\t\tif (this.#hasMoves && graph.hasOrderedChildren)\n+\t\t\treturn graph.withProjectionScratch((scratch) =>\n+\t\t\t\tscan(scratchLayoutNodes(graph, (id) => this.#has(graph.atom(id).seq), scratch, graph.nodeOf(start))),\n+\t\t\t);\n+\t\treturn scan(this.#layoutNodes(start));\n+\t}\n+\n \t/** Index of a line in `sequence(path)`, or -1. */\n \tsequenceIndex(path: string, line: LineId): number {\n \t\tconst f = this.#file(path, true);"}],"unmatched":[]}