summaryrefslogtreecommitdiff
path: root/src/look.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/look.zig')
-rw-r--r--src/look.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/look.zig b/src/look.zig
index 1f81d6ec..a230d740 100644
--- a/src/look.zig
+++ b/src/look.zig
@@ -1046,7 +1046,7 @@ fn openPaneTarget(p: *const Pardes, path: []const u8, at: Spot) ?Target {
if (tt.image) |iv| if (std.mem.eql(u8, iv.path, path)) {
return .{ .pane = .{ .id = i, .at = .{} } };
};
- if (comptime pdf_enabled) if (tt.pdf) |pv| if (std.mem.eql(u8, pv.path, path)) {
+ if (comptime pdf_enabled) if (tt.pdf) |*pv| if (std.mem.eql(u8, pv.path, path)) {
return .{ .pane = .{ .id = i, .at = at } };
};
const ff = if (tt.file) |*f| f else continue;
@@ -1149,7 +1149,7 @@ fn canonicalLookLocation(p: *Pardes, id: usize, text: []const u8) ?[]const u8 {
if (target.id >= p.panes.len) return null;
const pane = p.panes[target.id] orelse return null;
if (pane.file) |file| return locationText(p, file.path, target.at);
- if (comptime pdf_enabled) if (pane.pdf) |doc| return locationText(p, doc.path, target.at);
+ if (comptime pdf_enabled) if (pane.pdf) |*doc| return locationText(p, doc.path, target.at);
if (pane.image) |iv| return locationText(p, iv.path, target.at);
var path: [32]u8 = undefined;
return locationText(p, std.fmt.bufPrint(&path, config.pane_addr ++ "{d}", .{pane.serial}) catch return null, target.at);
@@ -1159,7 +1159,7 @@ fn canonicalLookLocation(p: *Pardes, id: usize, text: []const u8) ?[]const u8 {
pub fn pdfLinkLocation(p: *Pardes, pane: *const Pane, link: if (pdf_enabled) pdf.Link else void) ?[]const u8 {
if (comptime !pdf_enabled) return null;
- const state = pane.pdf orelse return null;
+ const state = &(pane.pdf orelse return null);
const id = p.paneIdOf(pane) orelse return null;
return switch (link.destination) {
.none => null,