summaryrefslogtreecommitdiff
path: root/src/look.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-21 14:35:15 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:15 -0300
commitbc3d18d27f9fc1155db7fac3946c4d38774f9e65 (patch)
tree9178ce95952797f8a78b16c2b805e53368efb35a /src/look.zig
parent1ecb9b720840ea8e4753823fa8cddcf5d6a3a4d2 (diff)
downloadpardes-bc3d18d27f9fc1155db7fac3946c4d38774f9e65.tar.gz
pardes-bc3d18d27f9fc1155db7fac3946c4d38774f9e65.zip
Build with Zig 0.17
ghostty, libvaxis and uucode move to ghostty's 0.17 pins, cloud9 to its 0.17 main, SDL to castholm's release-3.4.x (3.4.18), zstbi and tree-sitter to forks with 0.17 build files (see build.zig.zon). A bare zig build copies the binaries into ~/.local/bin (-Dhome-install=false leaves it out): 0.17 keeps the prefix from build scripts. A terminal's edited copy goes when the program clears the screen. tinywin.snap is gone; perf baselines are re-recorded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 1065cb02..f9c470cf 100644
--- a/src/look.zig
+++ b/src/look.zig
@@ -671,7 +671,7 @@ pub fn runSearch(p: *Pardes, id: usize, pat_raw: []const u8, kind: Search, start
const cl: usize = @intCast(@max(0, pane.body.cur_row));
const cc: usize = @intCast(@max(0, pane.body.cur_col));
for (lines, 0..) |ln, i| {
- const at = std.ascii.indexOfIgnoreCase(ln, pat) orelse continue;
+ const at = std.ascii.findIgnoreCase(ln, pat) orelse continue;
const row = try std.fmt.allocPrint(arena, "{s}:{d}:{d}{c}{d} {s}\n", .{
loc, i + 1, at + 1, config.range_sep, at + pat.len, std.mem.trimEnd(u8, ln, " \t"),
});
@@ -1273,7 +1273,7 @@ fn missText(text: []const u8, buf: *[miss_path_cap + "…".len]u8) []const u8 {
test "a miss names a long path by its start and its end, its middle given up to …" {
var cut: [miss_path_cap + "…".len]u8 = undefined;
- const long = "/home/someone/" ++ "deep/" ** 80 ++ "the-file.zig";
+ const long = "/home/someone/" ++ std.mem.asBytes(&@as([80][5]u8, @splat("deep/".*))) ++ "the-file.zig";
const said = missText(long, &cut);
try std.testing.expect(said.len <= miss_path_cap);
try std.testing.expect(std.mem.startsWith(u8, said, "/home/someone/"));
@@ -2185,7 +2185,7 @@ test "Look ignores missing and out of bounds pane addresses" {
test "a pointer resting where a look-hover found nothing does not wake the core every frame" {
const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 24 });
defer p.deinit();
- _ = try p.setTestFile(" \n" ** 30);
+ _ = try p.setTestFile(std.mem.asBytes(&@as([30][6]u8, @splat(" \n".*))));
p.sync();
const r = p.rects[p.active];
// Resting on blanks in the body: a wait, then nothing to open.