summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/cmd_window.go34
-rw-r--r--client/ui.go4
2 files changed, 38 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("")
diff --git a/client/ui.go b/client/ui.go
index 37b7d4e..023a1bf 100644
--- a/client/ui.go
+++ b/client/ui.go
@@ -64,6 +64,10 @@ func (a *application) show() {
Style: &tui.Style {Fg: tui.White, Bg: colorDefault[false]},
})
+ if a.currentWindow != (cmdWindowLocation{}) {
+ a.cmdWindow.showPreview()
+ }
+
a.getWin().Buffer().Show("buffer")
tui.Push("input border", tui.Box {
Width: tui.Fill, Height: 1, Dir: tui.Left,