diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-25 04:58:53 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-25 05:18:54 -0300 |
| commit | 920aaa6e6c2317aa775937b01f727fa9418b7db2 (patch) | |
| tree | 1cb02617ddfbe59712717e9ecb60ad766bf743ee /core/Command.zig | |
| parent | 3c4b2c99b1a969abad0a530fa99b70b2cb564af3 (diff) | |
| download | pardes-920aaa6e6c2317aa775937b01f727fa9418b7db2.tar.gz pardes-920aaa6e6c2317aa775937b01f727fa9418b7db2.zip | |
tagline, Trail, Core, layout: the tag out of rest is the owner's word, the newest step's and the head, nothing else (walk UI polish P1, UX DESIGN.md D1, the coordinator's R1-CORRECTED: the user's "why the tagline is still showing the regular tagline text?"): out of rest the path, Keep, the forward steps, the progress and the tag's own words were drawn before the head, so the key cells and the band's spines hung 40-50 columns in (shot 02's spines at column 50) and a picker's tag named the PREVIEWED file as the pane's own (shot 04: `/tmp/.../core/Store.zig ␣ f Find re 2/3`); now `‹@p1 › rank.zig:20 › ␣ ▸ b buffer…`, the head from the tag's first text column when there is no walk (`␣ f Find re`), the spines at columns 2-4; THE CHANGE: Trail.Part `.newest` writes the owner's word and the newest back step's alone, each with ` › `, a word past 24 cells cut in its middle with `…` (D1 item 4), and `stepAt(.newest)` maps a Look or Exec on any of its cells to that step; tagline.pathPrefix returns it while Trail.outOfRest (the live view's host is the pane: asking is rest and keeps its path), the old body now `restPath`; `restPrefix`, the prefix as at rest whatever the state, is what Core.sync measures `tag_lead` by (the tag's cursor and selections are offsets in its text at rest: a head over its own text moves none of them; on the shown prefix they were shifted by the path's length and back, and `| in a tag pipes the tag's own text` piped 4 wrong bytes) and what layout.wantedTagRows counts the rest rows with (a tag out of rest keeps them at least); the heads no longer lead with a space (TagState's Help/Keys/Rename/level, Pick.head, Prompt.head: the out-of-rest prefix ends in its own ` › `); no name tint, forward-step ink, unlit search word or progress out of rest (draw.zig tagTintRange, paintPaneTag; Prompt.unlit); tagline.onName and forwardSpan are off out of rest; `Trail.folded` is gone (it only told out of rest, now `.newest`: at rest it is `shown_steps`), `nameAt` takes no Pardes; TEST FIRST: Trail.zig "Enter on a word of the walk ...": out of rest `‹@pN › rank.zig:20 › ␣ ▸ ` with no older step, no directory, no Keep (on the base `‹@pN › · › rank.zig:20 › <dir>/rank.zig`: fails), a step back hides its forward step out of rest, Look maps the newest word and the owner's to their steps, and the tag at rest byte-identical after Esc; Pick.zig's reader test: the picker's head starts the tag's text (`␣ f Find pick 1/1`), no previewed path; the heads' other tests drop their leading space; test/behaviour keys.zig's prompt case reads the tag file out of rest as the head alone (`s zq`, no `/test.txt`); behaviour-test 277/277; core-test 1062/1232 (170 skipped); process-test: 8 goldens regenerated and read, each changed row the out-of-rest tag with no path (leader, pipe, msg, selregex, find, fsearch, lsp, ttyhelp: the band's spines at columns 2-4, the steps right of them, the rows no longer pushed onto a second tag row; msg's `s EXT` head and fsearch's `/` head still wrap their hints mid-word: D3's); a user meets it in every state out of rest
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'core/Command.zig')
| -rw-r--r-- | core/Command.zig | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/Command.zig b/core/Command.zig index 55c336f1..334d49a2 100644 --- a/core/Command.zig +++ b/core/Command.zig @@ -685,7 +685,7 @@ test ": opens a field in the tag after its key cell: the tag's own words first, try std.testing.expectEqual(Prompt.Op.command, s.prompt.op); try std.testing.expectEqual(panes.Pane.Focus.body, pane.focus); // The head: its key cell, the field, the count, the hints. - try std.testing.expect(has(try tagOf(p), " : 16 commands Tab complete · ⏎ run · C-r history · esc")); + try std.testing.expect(has(try tagOf(p), ": 16 commands Tab complete · ⏎ run · C-r history · esc")); // The rows: the tag's words in its order, `in the tag`, the last ruled // off; then the commands, each what it takes. try std.testing.expect(has(try bandRow(p, a, 0), "▶ Save ")); @@ -700,7 +700,7 @@ test ": opens a field in the tag after its key cell: the tag's own words first, try std.testing.expect(has(first[7].text, "theme") and has(first[7].text, "<theme>")); // Typing filters both, by the scorer, in their order. typeKeys(p, "th"); - try std.testing.expect(has(try tagOf(p), " : th = Exec th 1 command ")); + try std.testing.expect(has(try tagOf(p), ": th = Exec th 1 command ")); try std.testing.expect(has(try bandRow(p, a, 0), "▶ theme ")); // Tab: the command, a space after it; the field's plain word is its // pardes word once it is whole. @@ -708,7 +708,7 @@ test ": opens a field in the tag after its key cell: the tag's own words first, try std.testing.expectEqualStrings("theme ", s.field.text()); typeKeys(p, "acme"); const worn = colors.themes[p.theme_preview.?].name; - try std.testing.expect(has(try tagOf(p), try std.fmt.allocPrint(a, " : theme acme = Exec Theme {s} ", .{worn}))); + try std.testing.expect(has(try tagOf(p), try std.fmt.allocPrint(a, ": theme acme = Exec Theme {s} ", .{worn}))); p.update(.{ .key = .{ .cp = Key.enter } }); try std.testing.expectEqual(TagState.Kind.rest, s.kind); try std.testing.expectEqualStrings(worn, p.theme().name); @@ -718,7 +718,7 @@ test ": opens a field in the tag after its key cell: the tag's own words first, // `:sort`: the selections piped through sort, as `|sort` does. while (p.nextEffect()) |_| {} typeKeys(p, "%:sort"); - try std.testing.expect(has(try tagOf(p), " : sort = Exec Edit |sort 1 command")); + try std.testing.expect(has(try tagOf(p), ": sort = Exec Edit |sort 1 command")); p.update(.{ .key = .{ .cp = Key.enter } }); var asked: ?u32 = null; while (p.nextEffect()) |effect| if (effect == .pipe) { @@ -727,7 +727,7 @@ test ": opens a field in the tag after its key cell: the tag's own words first, try std.testing.expectEqualStrings("sort", p.pipe.pipeRequest(asked orelse return error.MissingPipeEffect).?.command); // `:goto 2`: Look `:2`. typeKeys(p, ":goto 2"); - try std.testing.expect(has(try tagOf(p), " : goto 2 = Look :2 <line> ")); + try std.testing.expect(has(try tagOf(p), ": goto 2 = Look :2 <line> ")); p.update(.{ .key = .{ .cp = Key.enter } }); try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row); // S-Tab: the last row; Tab after it, round to the first. A tag word @@ -819,9 +819,9 @@ test ":theme lists the themes and the whole window wears the current one, none d try std.testing.expectEqual(Rows.values, s.prompt.command.rows); try std.testing.expectEqual(@as(u16, 2), s.nhits); try std.testing.expect(has(try bandRow(p, a, 0), "▶ on now")); - try std.testing.expect(has(try tagOf(p), " : set Wrap = Exec Wrap 2 values ")); + try std.testing.expect(has(try tagOf(p), ": set Wrap = Exec Wrap 2 values ")); typeKeys(p, "of"); - try std.testing.expect(has(try tagOf(p), " : set Wrap of = Exec Wrap of 1 value ")); + try std.testing.expect(has(try tagOf(p), ": set Wrap of = Exec Wrap of 1 value ")); p.update(.{ .key = .{ .cp = Key.tab } }); p.update(.{ .key = .{ .cp = Key.enter } }); try std.testing.expect(!p.settings.wrap); @@ -843,7 +843,7 @@ test ":theme lists the themes and the whole window wears the current one, none d // :open: the line goes to Find, the rest of it the query, the keys // after it typed into Find's field. typeKeys(p, ":o"); - try std.testing.expect(has(try tagOf(p), " : o = Exec Find ")); + try std.testing.expect(has(try tagOf(p), ": o = Exec Find ")); typeKeys(p, " te"); try std.testing.expectEqual(TagState.Kind.pick, s.kind); try std.testing.expectEqual(pardes.Pick.Source.find, pardes.Pick.live(p).?.source); @@ -885,7 +885,7 @@ test ": has a history of its own: Up and Down bring back the lines Enter ran, ne typeKeys(p, ":"); p.update(.{ .key = .{ .cp = Key.up } }); try std.testing.expectEqualStrings("goto 2", s.field.text()); - try std.testing.expect(has(try tagOf(p), " : goto 2 = Look :2 <line> ")); + try std.testing.expect(has(try tagOf(p), ": goto 2 = Look :2 <line> ")); p.update(.{ .key = .{ .cp = Key.up } }); try std.testing.expectEqualStrings("set Wrap off", s.field.text()); try std.testing.expectEqual(Rows.values, s.prompt.command.rows); |
