diff options
Diffstat (limited to 'src/ninep/ctl.zig')
| -rw-r--r-- | src/ninep/ctl.zig | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index cb4cfa97..2a2131e3 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -91,7 +91,7 @@ pub fn run(p: *Pardes, id: usize, exec: bool, text: []const u8, in_tag: bool) vo for (after.list[0..after.len]) |serial| if (std.mem.indexOfScalar(u32, before.list[0..before.len], serial) == null) { // A query pane's +Preview is its query pane's: that answers. if (p.paneBySerial(serial)) |made| if (p.panes[made].?.file) |f| if (f.output) |o| if (o.from == .preview) continue; - // A look that made a +Search pane (LookWord list, a terminal) + // A look that made a +Search pane (a terminal's word) // answers it: that is where the places it found are. noteResult(p, serial); created = true; @@ -732,9 +732,9 @@ pub fn fillPager(p: *Pardes, serial: u32, held: *std.ArrayList(u8)) error{OutOfM f.pager_spans = page.spans; f.saved_revision = f.revision; // A diff paged (`git show`, difftui's patches): its hunks stacked in a - // +Diff (DiffLook hunks) in the +Pager's place, the +Pager closed. The - // keyboard stays where it was, as a page's. - if (f.pager_diff and p.settings.diff_look == .hunks) { + // +Diff in the +Pager's place, the +Pager closed. The keyboard stays + // where it was, as a page's. + if (f.pager_diff) { const keyboard = p.active; if (panes.Output.openDiff(p, id, f.path, f.content)) |hid| { // ponytail: the text is gone with it; Diff on the +Diff says no such file. @@ -954,7 +954,7 @@ pub fn writeFocus(p: *Pardes, req: Req) Reply { const id = p.paneBySerial(serial) orelse return tree.failText(req.tag, E.NOENT, e_no_pane); // The keyboard goes to the pane itself, off any header that had it, and // its column becomes the active one, as the user's click there would - // make it: pane/new and a look place there next, whatever Placement. + // make it: pane/new and a look place there next. tagline.exitHeader(p); p.active = id; if (pardes.layout.findPane(p, id)) |at| p.setActiveColumn(at.col); @@ -1429,7 +1429,7 @@ test "commands lists every builtin with its argument and the ctl that takes it" var here: usize = 0; for (std.enums.values(Builtin)) |b| here += @intFromBool(builtins.registry.here(p, b)); try testing.expectEqual(here, lines); - for ([_][]const u8{ "\nDel arg pane -- ", "\nNewcol root -- ", "\nSave arg pane", "\nVerbose arg root on,off", "\nPlacement arg root acme,pardes", "\nUndo pane -- ", "\nEdit arg both -- acme's Edit" }) |row| + for ([_][]const u8{ "\nDel arg pane -- ", "\nNewcol root -- ", "\nSave arg pane", "\nVerbose arg root on,off", "\nUndo pane -- ", "\nEdit arg both -- acme's Edit" }) |row| try testing.expect(std.mem.indexOf(u8, listed.bytes, row) != null); } @@ -2052,10 +2052,9 @@ test "a terminal told the directory it already goes by logs no rename" { try testing.expect(th.logHas(p, try std.fmt.bufPrint(&rec, "rename {d} /usr", .{p.panes[term].?.serial}))); } -test "a terminal with text typed at its prompt is never typed into: a look at its directory opens another" { +test "a terminal with text typed at its prompt is never typed into: a look at its directory or an exec at it opens a pane of its own" { const p = try th.withTerm(testing.allocator); defer p.deinit(); - p.settings.dir_look = .terminal; // `ls` in a terminal, not a directory pane const term = p.paneBySerial(serialOf(p)).?; p.setCwd(term, "/tmp"); p.update(.{ .output = .{ .pane = @intCast(term), .bytes = "\x1b]133;A;aid=pardes\x07$ \x1b]133;B;aid=pardes\x07TYPED" } }); @@ -2598,7 +2597,6 @@ test "every word's /commands description is its own doc comment's first sentence "\nNewcol root -- An empty column right of the keyboard's, its tag taking the keyboard.\n", "\nSave arg pane -- Write the pane's text to its file, or to the file its argument names.\n", "\nVerbose arg root on,off -- A builtin says its own name on the message row as it runs, on or off.\n", - "\nPlacement arg root acme,pardes -- Where a new pane goes: acme, as makenewwindow does, or pardes, the older rules.\n", "\nKill arg root -- acme's Kill: stop the commands pardes started", }) |row| try testing.expect(std.mem.indexOf(u8, listed, row) != null); try testing.expect(std.mem.indexOf(u8, listed, ".c:") == null); |
