summaryrefslogtreecommitdiff
path: root/core/edit.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/edit.zig')
-rw-r--r--core/edit.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/edit.zig b/core/edit.zig
index 0b08dc9e..3e57927a 100644
--- a/core/edit.zig
+++ b/core/edit.zig
@@ -777,7 +777,7 @@ fn treeIndent(e: Editor, t: *Text, text: []const u8, row: usize, at: usize) Erro
const tree = normal.fileTree(e.p, f) orelse return null;
// The tree is of the file's text, in its lines and offsets (the
// `Changes` layer's lines are none of it).
- if (f.read_only.len == 0) return indents.forNewline(e.scratch, l, tree, text, row, at);
+ if (f.layer.lines.len == 0) return indents.forNewline(e.scratch, l, tree, text, row, at);
return indents.forNewline(e.scratch, l, tree, try panes.File.fileText(f, e.scratch), panes.File.fileRow(f, row), panes.File.fileOffset(f, at));
}