From c9548e938589d730338db84c9649fed81c852705 Mon Sep 17 00:00:00 2001 From: citrons Date: Mon, 2 Jun 2025 08:00:26 -0500 Subject: command window preview --- client/cmd_window.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'client/cmd_window.go') diff --git a/client/cmd_window.go b/client/cmd_window.go index 4a1b664..261b550 100644 --- a/client/cmd_window.go +++ b/client/cmd_window.go @@ -107,6 +107,40 @@ func (w *cmdWindow) ShowStatusLine() { } } +func (w *cmdWindow) showPreview() { + bottom := w.buf.Bottom() + if bottom == nil { + return + } + msg := bottom.Msg() + + tui.Push("command window container", tui.Box { + Width: tui.Fill, Height: tui.Children, + }) + + tui.Push(msg.Id(), tui.Box {Width: tui.Fill, Height: tui.Children}) + msg.Show(false) + tui.Pop() + + tui.Push("command window border", tui.Box { + Width: tui.Fill, Height: 1, Dir: tui.Left, + Style: &tui.Style {Bg: tui.White, Fg: tui.Black}, + }) + + tui.Push("", tui.Box {Width: tui.Fill, Height: 1}) + tui.Pop() + + tui.Push("command window status", tui.Box { + Width: tui.TextSize, Height: 1, NoWrap: true, + }) + w.ShowStatusLine() + tui.Pop() + + tui.Pop() + + tui.Pop() +} + func (w *cmdWindow) loginMode() { w.login = true w.input.SetText("") -- cgit v1.2.3