diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-15 14:22:42 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-15 17:24:42 -0300 |
| commit | ac097fc86d710cdc8e83804b00663ac787f8b383 (patch) | |
| tree | 1a94a9973254b8ac1e3bcc625e819dee9552a955 /src/panes.zig | |
| parent | 6d7b506c8a380e4dd97f337590ca079d810a360a (diff) | |
| download | pardes-ac097fc86d710cdc8e83804b00663ac787f8b383.tar.gz pardes-ac097fc86d710cdc8e83804b00663ac787f8b383.zip | |
Expose LocationsConfig in location result pane tags
Diffstat (limited to 'src/panes.zig')
| -rw-r--r-- | src/panes.zig | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/panes.zig b/src/panes.zig index a66d8e21..ede1d661 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -2265,6 +2265,13 @@ pub const Output = struct { }; } + pub fn usesLocationsConfig(from: Origin) bool { + const tr = traits(from); + return tr.steps and !tr.commands and from != .pdf_links and + !std.meta.eql(from, Origin{ .cmd = .Find }) and + !std.meta.eql(from, Origin{ .query = .completion }); + } + pub fn fileTraits(out: ?State) Traits { return traits((out orelse return file_row).from); } @@ -2480,11 +2487,7 @@ pub const Output = struct { return; } } - const format_locations = traits(from).steps and !traits(from).commands and - from != .pdf_links and - !std.meta.eql(from, Origin{ .cmd = .Find }) and - !std.meta.eql(from, Origin{ .query = .completion }); - if (format_locations) { + if (usesLocationsConfig(from)) { const formatted = try locations.format(p, dir, content, anchor, true); p.gpa.free(result_content); result_content = formatted.content; |
