diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-02 06:40:29 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-02 06:40:29 -0500 |
| commit | 58281da28614386809eab60c9dcbb86082354f1b (patch) | |
| tree | fc53eba37cbad850f14b13a45cf5436a5f9acf00 /client/ui.go | |
| parent | 33e59b1b318ea911d9a63cd78c6bc5eee0bb4109 (diff) | |
indicate when the user is scrolled up
Diffstat (limited to 'client/ui.go')
| -rw-r--r-- | client/ui.go | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/client/ui.go b/client/ui.go index 2fc71f6..37b7d4e 100644 --- a/client/ui.go +++ b/client/ui.go @@ -65,13 +65,29 @@ func (a *application) show() { }) a.getWin().Buffer().Show("buffer") - tui.Push("status", tui.Box { - Width: tui.Fill, Height: tui.BoxSize(1), Dir: tui.Right, + tui.Push("input border", tui.Box { + Width: tui.Fill, Height: 1, Dir: tui.Left, Style: &tui.Style {Bg: tui.White, Fg: tui.Black}, }) + + if a.getWin().Buffer().ScrollPos() > 0 { + tui.Push("", tui.Box {Width: tui.TextSize, Height: 1, NoWrap: true}) + if a.getWin().Buffer().AtTop() { + tui.Text("[TOP]", nil) + } else { + tui.Text("[MORE]", nil) + } + tui.Pop() + } + tui.Push("", tui.Box {Width: tui.Fill, Height: 1}) + tui.Pop() + + tui.Push("status", tui.Box {Width: tui.TextSize, Height: 1, NoWrap: true}) a.getWin().ShowStatusLine() tui.Pop() + tui.Pop() + tui.Push("input container", tui.Box { Width: tui.Fill, Height: tui.Children, Dir: tui.Right, }) |
