地圖 (Jido) is a lightweight Unix TUI file explorer designed for speed and simplicity.

chore: remove buf_size from Image

+2 -2
-1
src/app.zig
··· 80 80 }; 81 81 82 82 pub const Image = struct { 83 - const buf_size = (1024 * 1024) * 5; // 5mb 84 83 const Status = enum { 85 84 ready, 86 85 processing,
+2 -1
src/drawer.zig
··· 682 682 } 683 683 684 684 fn loadImage(app: *App, path: []const u8) error{OutOfMemory}!void { 685 - var buf: [(1024 * 1024) * 5]u8 = undefined; 685 + var buf: [(1024 * 1024) * 5]u8 = undefined; // 5mb 686 686 const data = vaxis.zigimg.Image.fromFilePath(app.alloc, path, &buf) catch { 687 687 app.images.mutex.lock(); 688 688 if (app.images.cache.getPtr(path)) |entry| { ··· 702 702 if (app.images.cache.getPtr(path)) |entry| { 703 703 entry.status = .ready; 704 704 entry.data = data; 705 + entry.path = path; 705 706 } else { 706 707 const message = try std.fmt.allocPrint(app.alloc, "Failed to load image '{s}' - error occurred while attempting to add image to cache.", .{path}); 707 708 defer app.alloc.free(message);