summaryrefslogtreecommitdiff
path: root/src/Jump.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 12:40:11 -0300
committerGabriel Schneider <[email protected]>2026-11-06 14:56:36 -0300
commita66a9eb6e0c69cfcb63717bc27704cdc96f382b4 (patch)
tree400e3034a6c71c1d15d0ad302e1293a4290071b9 /src/Jump.zig
parent36a51ddc67d0beb7d9851fb2425cf780a47fed36 (diff)
downloadpardes-a66a9eb6e0c69cfcb63717bc27704cdc96f382b4.tar.gz
pardes-a66a9eb6e0c69cfcb63717bc27704cdc96f382b4.zip
idioms #11, the command layer: exec, builtins, edit_cmd, Messages, Dir, Output, Jump and Pipe say their messages through buffers proven big enough (or the long argument cut) instead of placeholder text, replId takes its 48-byte buffer, a failed Save path, Get or Incl path, Repl send, Tutor, +Unsaved, pipe or Edit output on OOM is reported (reportError) rather than silently dropped, Edit's why and zonWhy cut a long text instead of losing it, and writeFailure names its set
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Jump.zig')
-rw-r--r--src/Jump.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Jump.zig b/src/Jump.zig
index 10014e9e..2603d672 100644
--- a/src/Jump.zig
+++ b/src/Jump.zig
@@ -302,7 +302,7 @@ pub fn jumpBy(p: *Pardes, delta: i32) void {
// stuck on one that cannot open.
if (found == null or !Pardes.recentKeeps(found.?.path)) {
var said: [recent_path_cap + 32]u8 = undefined;
- if (found) |e| p.setMessage(v.active, std.fmt.bufPrint(&said, "{s}: deleted, skipped", .{e.path}) catch "deleted, skipped");
+ if (found) |e| p.setMessage(v.active, std.fmt.bufPrint(&said, "{s}: deleted, skipped", .{e.path[0..@min(e.path.len, recent_path_cap)]}) catch unreachable); // cap and 18 fit
const hash = j.path_hash;
var w: usize = 0;
var cur = v.jumps.cur;