summaryrefslogtreecommitdiff
path: root/src/edit_cmd.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-23 10:56:33 -0300
committerGabriel Schneider <[email protected]>2026-10-23 17:10:58 -0300
commita0d367b6c54ff29737662fd7cf5a78d4d183cb20 (patch)
tree295dfa438f54b72a907d2c847784d5b5982fca9e /src/edit_cmd.zig
parent7b743fcc7d568f13512a59089c5214bb6fa3282f (diff)
downloadpardes-a0d367b6c54ff29737662fd7cf5a78d4d183cb20.tar.gz
pardes-a0d367b6c54ff29737662fd7cf5a78d4d183cb20.zip
Audit (core, modal): goto/insert/select tables, edit through sam.Op and sam.apply, Turn.bump and awaitPast, dead helpers out
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/edit_cmd.zig')
-rw-r--r--src/edit_cmd.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/edit_cmd.zig b/src/edit_cmd.zig
index c8473e99..9542f4a9 100644
--- a/src/edit_cmd.zig
+++ b/src/edit_cmd.zig
@@ -78,7 +78,7 @@ const World = struct {
}
if (comptime !pardes.hosted) return true;
const local = filesystem.localPath(path) orelse return true;
- if (@import("exec.zig").isDirectory(local)) return said(bool, why, "B: {s} is a directory", .{path}) orelse false;
+ if (@import("exec.zig").kindOf(local) == .directory) return said(bool, why, "B: {s} is a directory", .{path}) orelse false;
var buf: [4096]u8 = undefined;
if (filesystem.resolveOs(local, &buf) == null) return said(bool, why, "B: {s}: no such file", .{path}) orelse false;
return true;
@@ -93,7 +93,7 @@ const World = struct {
fn open(ctx: *anyopaque, path: []const u8, why: *sam.Why) ?sam.File {
const w: *World = @ptrCast(@alignCast(ctx));
const p = w.p;
- if (comptime pardes.hosted) if (filesystem.localPath(path)) |local| if (@import("exec.zig").isDirectory(local))
+ if (comptime pardes.hosted) if (filesystem.localPath(path)) |local| if (@import("exec.zig").kindOf(local) == .directory)
return said(sam.File, why, "B: {s} is a directory", .{path});
// A look opens it, or finds it open, where a look would; the
// keyboard stays where the Edit ran.
@@ -113,7 +113,7 @@ const World = struct {
fn read(ctx: *anyopaque, arena: std.mem.Allocator, path: []const u8, why: *sam.Why) ?[]const u8 {
const w: *World = @ptrCast(@alignCast(ctx));
- if (comptime pardes.hosted) if (filesystem.localPath(path)) |local| if (@import("exec.zig").isDirectory(local))
+ if (comptime pardes.hosted) if (filesystem.localPath(path)) |local| if (@import("exec.zig").kindOf(local) == .directory)
return said([]const u8, why, "{s} is a directory", .{path});
const bytes = filesystem.read(w.p, path) catch |err| {
// In the words Get says them (builtins.Get).