diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-05 19:42:46 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-07 16:02:18 -0500 |
| commit | 0f1c3ef1871f311d79f8274585bdb2925152f576 (patch) | |
| tree | b1b281eebc8dd2a8f07ddaad698515cfbe25b517 /client/cmd_window.go | |
| parent | 2d54af98b89d5f7ff43bc0d887e42bde7ef87dbc (diff) | |
limit size of command window preview
Diffstat (limited to 'client/cmd_window.go')
| -rw-r--r-- | client/cmd_window.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/cmd_window.go b/client/cmd_window.go index e8dcaed..0a76e25 100644 --- a/client/cmd_window.go +++ b/client/cmd_window.go @@ -86,9 +86,11 @@ func (w *cmdWindow) showPreview() { Width: tui.Fill, Height: tui.Children, }) + var isOverflow bool tui.Push(msg.Id(), tui.Box { Width: tui.Fill, Height: tui.Children, Style: &tui.Style {Fg: tui.White, Bg: colorDefault[bottom.IsOdd()]}, + Overflow: true, MaxHeight: 7, IsOverflow: &isOverflow, }) msg.Show(bottom.IsOdd()) tui.Pop() @@ -98,6 +100,12 @@ func (w *cmdWindow) showPreview() { Style: &tui.Style {Bg: tui.White, Fg: tui.Black}, }) + if isOverflow { + tui.Push("", tui.Box {Width: tui.TextSize, Height: 1, NoWrap: true}) + tui.Text("[MORE]", nil) + tui.Pop() + } + tui.Push("", tui.Box {Width: tui.Fill, Height: 1}) tui.Pop() |
