diff options
Diffstat (limited to 'core/Trail.zig')
| -rw-r--r-- | core/Trail.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/Trail.zig b/core/Trail.zig index cd8eb924..9b0d64ea 100644 --- a/core/Trail.zig +++ b/core/Trail.zig @@ -250,7 +250,9 @@ fn show(p: *Pardes, id: usize, path: []const u8, at: Spot) !usize { .opened => |free| free, .shown, .none => return p.view().active, }; - if (at.line > panes.File.nlines(p.gpa, &p.panes[free].?.file.?)) { + // (A kind's pane, look.open's for a file a kind takes, has no lines.) + const nf = if (p.panes[free].?.file) |*f| f else return free; + if (at.line > panes.File.nlines(p.gpa, nf)) { try p.removePane(free, null); p.view().active = id; return error.LineMissing; |
