{"draft":null,"from":139,"to":140,"files":[{"path":"src/engine/view.ts","added":16,"removed":10,"diff":"--- a/src/engine/view.ts\n+++ b/src/engine/view.ts\n@@ -420,7 +420,7 @@\n \t\treturn this.#layoutResolved(path, complete);\n \t}\n \n-\t#layoutResolved(path: string, complete: boolean, nodes?: Iterable<number>): FileState {\n+\t#attributes(path: string): FileAttrs {\n \t\tconst graph = this.graph;\n \t\t// For each attribute, the highest-priority setter in the set wins.\n \t\tconst setters = new Map<string, { id: AtomId; value: string | null }>();\n@@ -433,6 +433,17 @@\n \t\t\t}\n \t\t}\n \n+\t\treturn {\n+\t\t\texists: setters.get(\"exists\")?.value === \"1\",\n+\t\t\texec: setters.get(\"exec\")?.value === \"1\",\n+\t\t\tlink: setters.get(\"link\")?.value ?? null,\n+\t\t\tblob: setters.get(\"blob\")?.value ?? null,\n+\t\t};\n+\t}\n+\n+\t#layoutResolved(path: string, complete: boolean, nodes?: Iterable<number>): FileState {\n+\t\tconst graph = this.graph;\n+\t\tconst attrs = this.#attributes(path);\n \t\tconst seq: number[] = [];\n \t\tconst vis: number[] = [];\n \t\tconst deletedBy = new Map<number, readonly number[]>();\n@@ -453,12 +464,7 @@\n \t\t\t} else vis.push(n);\n \t\t\tif (complete) seq.push(n);\n \t\t}\n-\t\tconst attrs: FileAttrs = {\n-\t\t\texists: setters.get(\"exists\")?.value === \"1\",\n-\t\t\texec: setters.get(\"exec\")?.value === \"1\",\n-\t\t\tlink: setters.get(\"link\")?.value ?? null,\n-\t\t\tblob: setters.get(\"blob\")?.value ?? null,\n-\t\t};\n+\n \t\treturn { attrs, complete, seq: Int32Array.from(seq), vis: Int32Array.from(vis), deletedBy };\n \t}\n \n@@ -496,13 +502,13 @@\n \n \t/** Whether the file exists in this projection (has a visible line). */\n \thasFile(path: string): boolean {\n-\t\tconst f = this.#file(path);\n-\t\treturn f.vis.length > 0 || f.attrs.exists || f.attrs.link !== null || f.attrs.blob !== null;\n+\t\tconst attrs = this.attrs(path);\n+\t\treturn attrs.exists || attrs.link !== null || attrs.blob !== null || this.#file(path).vis.length > 0;\n \t}\n \n \t/** A file's attributes: kept while empty, executable, a link's target. */\n \tattrs(path: string): FileAttrs {\n-\t\treturn this.#file(path).attrs;\n+\t\treturn this.#files.get(path)?.attrs ?? this.#attributes(path);\n \t}\n \n \t/** The projected text of a file (\"\" if it has no visible lines). */"}],"unmatched":[]}