summaryrefslogtreecommitdiff
path: root/core/edit.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/edit.zig')
-rw-r--r--core/edit.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/edit.zig b/core/edit.zig
index 3e57927a..8ed7752e 100644
--- a/core/edit.zig
+++ b/core/edit.zig
@@ -680,6 +680,11 @@ fn setEditTextSpan(e: Editor, t: *Text, new: []u8, known_end: ?modal.Cursor, spa
// caller reads the new text back, as a body's is kept.
defer retireEditText(e, new);
const pane = t.pane() orelse return;
+ // Out of rest the tag shows its head, which is no one's to edit.
+ if (try pardes.TagState.head(e.p, e.scratch, pane) != null) {
+ t.refused = true;
+ return;
+ }
const prefix = try tagline.pathPrefix(e.p, e.scratch, pane);
if (!std.mem.startsWith(u8, new, prefix)) {
t.refused = true;