diff options
Diffstat (limited to 'src/File.zig')
| -rw-r--r-- | src/File.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/File.zig b/src/File.zig index 2bf9f57d..22e3c434 100644 --- a/src/File.zig +++ b/src/File.zig @@ -654,6 +654,7 @@ pub fn cursorLines(arena: std.mem.Allocator, pane: *Pane, f: *State) ![]const [] /// Use the file's line index only when `text` is its complete live content. /// Edit-buffer fragments and other temporary text retain modal's scan path. fn contentIndex(t: *Text, text: []const u8) ?[]const usize { + if (t.what != .body) return null; const pane = t.pane(); const f = if (pane.file) |*file| file else return null; if (text.ptr != f.content.ptr or text.len != f.content.len) return null; |
