summaryrefslogtreecommitdiff
path: root/core/edit.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/edit.zig')
-rw-r--r--core/edit.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/edit.zig b/core/edit.zig
index 70b765cc..3517fe80 100644
--- a/core/edit.zig
+++ b/core/edit.zig
@@ -705,9 +705,9 @@ fn setEditTextSpan(e: Editor, t: *Text, new: []u8, known_end: ?modal.Cursor, spa
t.own = new;
return;
}
+ // Read-only text (a file at a revision, the `Changes` layer's lines) is
+ // refused where every edit of a text is, File.edit, in words.
const pane = t.pane() orelse return retireEditText(e, new);
- // A file at a revision is read-only (jj.zig).
- if (pane.file) |*f| if (f.output) |o| if (o.from == .revision) return retireEditText(e, new);
// A live query pane's rows are its line 1's (Query.zig): an edit there
// is refused, as a tag's prefix refuses one, and one from line 1 into
// them is cut at its end. The rows' metadata stays theirs across an