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, 2 insertions, 0 deletions
diff --git a/core/edit.zig b/core/edit.zig
index 0014f681..7a57fd09 100644
--- a/core/edit.zig
+++ b/core/edit.zig
@@ -705,6 +705,8 @@ fn setEditTextSpan(e: Editor, t: *Text, new: []u8, known_end: ?modal.Cursor, spa
return;
}
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