diff options
| author | Julian Hurst <julian.hurst@digdash.com> | 2025-03-20 10:11:10 +0100 |
|---|---|---|
| committer | Julian Hurst <julian.hurst@digdash.com> | 2025-03-20 10:11:10 +0100 |
| commit | b77edc89bcc4903166d010493e2ee6789fd57c63 (patch) | |
| tree | 1c242f3a08fbca1bfd76266b6f37d59aefe89936 | |
| parent | 5482d95638470f129fbb0dfc92176f4b296f389e (diff) | |
| parent | 589377ae5f1694cd5ad07105d5142348afd0fde3 (diff) | |
| download | hare-tui-b77edc89bcc4903166d010493e2ee6789fd57c63.tar.gz | |
Merge branch 'master' into nomem
| -rw-r--r-- | tui/widget/list/list.ha | 4 | ||||
| -rw-r--r-- | tui/widget/list/scrolllist.ha | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tui/widget/list/list.ha b/tui/widget/list/list.ha index 61ab22d..56588ec 100644 --- a/tui/widget/list/list.ha +++ b/tui/widget/list/list.ha @@ -25,9 +25,9 @@ style: (*widget::style | void), items: str...) (list | tty::error) = { let end = match (sz) { case let sz: tty::ttysize => - yield if (tsz.rows < sz.rows) tsz.rows else sz.rows; + yield if (tsz.rows < sz.rows) tsz.rows - 1 else sz.rows; case void => - yield tsz.rows; + yield tsz.rows - 1; }; if (end > len(items)) { diff --git a/tui/widget/list/scrolllist.ha b/tui/widget/list/scrolllist.ha index e55296d..3aaad87 100644 --- a/tui/widget/list/scrolllist.ha +++ b/tui/widget/list/scrolllist.ha @@ -21,8 +21,8 @@ style: (*widget::style | void), items: str...) (scrolllist | tty::error) = { let end = match (sz) { case let sz: tty::ttysize => - const rows = if (tsz.rows < sz.rows) tsz.rows else sz.rows; - yield rows - 1; + const rows = if (tsz.rows < sz.rows) tsz.rows - 1 else sz.rows; + yield rows; case void => yield tsz.rows - 1; }; |
