summaryrefslogtreecommitdiff
path: root/src/File.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/File.zig')
-rw-r--r--src/File.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/File.zig b/src/File.zig
index 262f3ebb..af538385 100644
--- a/src/File.zig
+++ b/src/File.zig
@@ -655,7 +655,7 @@ pub fn cursorLines(arena: std.mem.Allocator, pane: *Pane, f: *State) ![]const []
/// 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 pane = t.pane() orelse return null;
const f = if (pane.file) |*file| file else return null;
if (text.ptr != f.content.ptr or text.len != f.content.len) return null;
return lineIndex(pane.gpa, f) catch null;