diff options
Diffstat (limited to 'core/Prompt.zig')
| -rw-r--r-- | core/Prompt.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/Prompt.zig b/core/Prompt.zig index 20c393bb..3dc13e1f 100644 --- a/core/Prompt.zig +++ b/core/Prompt.zig @@ -1145,7 +1145,12 @@ fn historyRows(p: *Pardes) u16 { pub fn steps(p: *Pardes, arena: std.mem.Allocator, out: *[Band.max_steps]Band.Step) ![]Band.Step { const s = &p.view().tag_state; var made: usize = 0; - if (s.prompt.op == .command) made = try Command.steps(p, arena, out); + // `:`'s history before its rows and their doc, which takes the width + // left after the others. + if (s.prompt.op == .command) { + if (s.prompt.history) made = try historyStep(p, arena, &out[0]); + return out[0 .. made + try Command.steps(p, arena, out[made..])]; + } if (s.prompt.op == .pipe_to) if (p.panes[TagState.hostOf(p) orelse return out[0..0]]) |pane| if (answered(p, pane, s.field.text())) |l| { var rows: std.ArrayList(Band.Row) = .empty; for (l.outs, l.codes, 0..) |o, c, i| { |
