summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-21 17:25:52 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:15 -0300
commit23518c9d7c061f8a06f6632da8b64b37801b514f (patch)
tree1f9688a5c2b2c224f47dd538ffab275b1f54da5c /src/pardes.zig
parentbc3d18d27f9fc1155db7fac3946c4d38774f9e65 (diff)
downloadpardes-23518c9d7c061f8a06f6632da8b64b37801b514f.tar.gz
pardes-23518c9d7c061f8a06f6632da8b64b37801b514f.zip
zig fmt for Zig 0.17
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 8da0922d..7e166847 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -924,7 +924,7 @@ test "Filter is ordered after Del and toggles only its terminal or +Pager pane"
const testing = std.testing;
const del = std.meta.stringToEnum(Builtin, "Del") orelse return error.MissingDelBuiltin;
const filter = std.meta.stringToEnum(Builtin, "Filter") orelse return error.MissingFilterBuiltin;
- try testing.expectEqual(@intFromEnum(del) + 1, @intFromEnum(filter));
+ try testing.expectEqual(@backingInt(del) + 1, @backingInt(filter));
const p = try Pardes.init(testing.allocator, .{ .tty_only = true });
defer p.deinit();
@@ -3308,8 +3308,8 @@ test "tabbed file aligns syntax cursor and mouse at the nearest insertion gap" {
const pane = try p.setTestFile("\treturn x\n");
const f = &pane.file.?;
f.highlights = try p.tree_sitter_gpa.alloc(u8, f.content.len);
- @memset(f.highlights, @intFromEnum(syntax.Syn.none));
- @memset(f.highlights[1..7], @intFromEnum(syntax.Syn.keyword));
+ @memset(f.highlights, @backingInt(syntax.Syn.none));
+ @memset(f.highlights[1..7], @backingInt(syntax.Syn.keyword));
f.syntax_dirty = false;
pane.body.cur_row = 0;
pane.body.cur_col = 1;
@@ -3721,7 +3721,7 @@ pub fn hit(key: Key, binding: []const config.Chord) bool {
return false;
}
-pub const sel_slot = @intFromEnum(config.select_button);
+pub const sel_slot = @backingInt(config.select_button);
/// Pixel dimensions are meaningful only to the native PDF placement path.
/// Keep resize events layout-only when that path is not part of the build.
@@ -6040,7 +6040,7 @@ pub const Pardes = struct {
// The one-failure rule is a write's: a refused open (its OTRUNC's
// truncation, a setattr, too), create or remove is its Rerror alone,
// no err, as is a write to pane/new, which is only ever read.
- const ruled = req.op == .write and req.node != @intFromEnum(ctlfs.TopFile.new);
+ const ruled = req.op == .write and req.node != @backingInt(ctlfs.TopFile.new);
if (reply.status == .err and ruled) ctlfs.events.noteError(p, req, reply);
// The request was a whole step of its own, so it settles the way a
// step does: the cursor and scroll reconciled, the scripted panes