summaryrefslogtreecommitdiff
path: root/core/Output.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Output.zig')
-rw-r--r--core/Output.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/Output.zig b/core/Output.zig
index 4284faf3..600ab085 100644
--- a/core/Output.zig
+++ b/core/Output.zig
@@ -389,7 +389,7 @@ pub fn fillResults(p: *Pardes, id: usize, dir: []const u8, from: Origin, arg: []
if (!std.meta.eql(output.from, from)) continue;
if (by_arg and !std.mem.eql(u8, output.arg(), arg)) continue;
if (!std.mem.eql(u8, std.Io.Dir.path.dirname(rf.path) orelse "", dir)) continue;
- if (!locations.sameInput(content, rf.content, rf.location_rows, p.locations_config.layout)) continue;
+ if (!locations.sameInput(p.settings.tab, content, rf.content, rf.location_rows, p.locations_config.layout)) continue;
try setArg(output, arg);
p.gpa.free(content);
p.fs.refilled = rp.serial;
@@ -1018,10 +1018,10 @@ test "stacked empty previews distinguish separators from trailing newlines" {
.{ .kind = .match, .path = &path, .at = .{ .line = 1, .col = 1 }, .location_end = 7, .code_start = 7 },
.{ .kind = .preview, .path = &path, .at = .{ .line = 1, .col = 1 }, .location_end = 0, .code_start = 0 },
};
- try std.testing.expect(locations.sameInput("x.c:1:1 ", "x.c:1:1\n", &rows, .stacked));
- try std.testing.expect(locations.sameInput("x.c:1:1 \n", "x.c:1:1\n\n", &rows, .stacked));
- try std.testing.expect(!locations.sameInput("x.c:1:1 ", "x.c:1:1\n\n", &rows, .stacked));
- try std.testing.expect(!locations.sameInput("x.c:1:1 \n", "x.c:1:1\n", &rows, .stacked));
+ try std.testing.expect(locations.sameInput(config.tab_width, "x.c:1:1 ", "x.c:1:1\n", &rows, .stacked));
+ try std.testing.expect(locations.sameInput(config.tab_width, "x.c:1:1 \n", "x.c:1:1\n\n", &rows, .stacked));
+ try std.testing.expect(!locations.sameInput(config.tab_width, "x.c:1:1 ", "x.c:1:1\n\n", &rows, .stacked));
+ try std.testing.expect(!locations.sameInput(config.tab_width, "x.c:1:1 \n", "x.c:1:1\n", &rows, .stacked));
}
test "two words looked for in a terminal share the directory's one +Search" {