summaryrefslogtreecommitdiff
path: root/src/output_pane.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/output_pane.zig')
-rw-r--r--src/output_pane.zig7
1 files changed, 5 insertions, 2 deletions
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