summaryrefslogtreecommitdiff
path: root/src/Output.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Output.zig')
-rw-r--r--src/Output.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Output.zig b/src/Output.zig
index 01e3e0f1..a17b0459 100644
--- a/src/Output.zig
+++ b/src/Output.zig
@@ -701,6 +701,11 @@ pub fn openJumps(p: *Pardes, id: usize) !void {
// A closed file's entry: marked, and a look at it opens it again.
if (j.serial == 0) {
const e = p.recentByHash(j.path_hash) orelse continue;
+ // A PDF's `col` is how far down its page, no Look's column.
+ if (j.pdf) {
+ try out.writer.print("{s}:{d} (closed)\n", .{ e.path, @max(1, j.line) });
+ continue;
+ }
try out.writer.print("{s}:{d}:{d} (closed)\n", .{ e.path, @max(1, j.line), @max(1, j.col) });
continue;
}
@@ -724,6 +729,8 @@ pub fn openJumps(p: *Pardes, id: usize) !void {
while (cut > 0 and cut < what.len and what[cut] & 0xc0 == 0x80) cut -= 1;
if (j.line == 0)
try out.writer.print("{s} {s}\n", .{ loc, what[0..cut] })
+ else if (j.pdf)
+ try out.writer.print("{s}:{d} {s}\n", .{ loc, j.line, what[0..cut] })
else
try out.writer.print("{s}:{d}:{d} {s}\n", .{ loc, j.line, j.col, what[0..cut] });
}