From 5961587b227e5fa097fb033e32c29da08a23fb18 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 2 Aug 2026 17:17:35 -0300 Subject: tty/image: big harness + golden coverage pass --- src/output_pane.zig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/output_pane.zig') diff --git a/src/output_pane.zig b/src/output_pane.zig index 3308e22a..bd11a227 100644 --- a/src/output_pane.zig +++ b/src/output_pane.zig @@ -254,15 +254,18 @@ pub fn openJumps(p: *Pardes, id: usize) void { for (p.jumps[0..p.njumps]) |j| { const jp = p.panes[j.pane] orelse continue; var idbuf: [16]u8 = undefined; - const has_path = if (jp.file) |f| f.output == null else false; + const pdf_path: ?[]const u8 = if (comptime pardes.pdf_enabled) jp.pdfPath() else null; + const has_path = if (jp.file) |f| f.output == null else pdf_path != null; const loc: []const u8 = if (has_path) - jp.file.?.path + (if (jp.file) |f| f.path else pdf_path.?) else std.fmt.bufPrint(&idbuf, config.pane_addr ++ "{d}", .{j.pane}) catch continue; const what: []const u8 = if (jp.file) |f| std.mem.trim(u8, modal.lineSlice(f.content, j.line -| 1), " \t\r") else if (jp.image) |iv| iv.path + else if (pdf_path) |path| + path else jp.cwdSlice(); // one line of a file can be the whole file: cut it, but never mid -- cgit v1.3