diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-02 08:00:26 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-02 08:00:26 -0500 |
| commit | c9548e938589d730338db84c9649fed81c852705 (patch) | |
| tree | d1ed1254dc33c2b20ef0e1ec452af76b03c320c7 /client/cmd_window.go | |
| parent | 58281da28614386809eab60c9dcbb86082354f1b (diff) | |
command window preview
Diffstat (limited to 'client/cmd_window.go')
| -rw-r--r-- | client/cmd_window.go | 34 |
1 files changed, 34 insertions, 0 deletions
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("") |
