diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/locations.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/locations.zig b/src/locations.zig index 43d99005..45d72c57 100644 --- a/src/locations.zig +++ b/src/locations.zig @@ -256,6 +256,11 @@ pub fn format(p: *pardes.Pardes, dir: []const u8, input: []const u8, anchor: ?us try out.writer.writeByte('\t'); const code_start = out.written().len - before; try out.writer.writeAll(row.code); + if (row.declaration and index + 1 < pending.items.len) { + const next = pending.items[index + 1]; + if (std.mem.eql(u8, row.path, next.path) and next.at.line -| row.at.line > 1) + try out.writer.writeAll(" ..."); + } if (index + 1 < pending.items.len or std.mem.endsWith(u8, input, "\n")) try out.writer.writeByte('\n'); const owned_path = try p.gpa.dupe(u8, row.path); errdefer p.gpa.free(owned_path); |
