diff options
Diffstat (limited to 'tui/widget/list/list.ha')
| -rw-r--r-- | tui/widget/list/list.ha | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tui/widget/list/list.ha b/tui/widget/list/list.ha index 56588ec..cbf83fa 100644 --- a/tui/widget/list/list.ha +++ b/tui/widget/list/list.ha @@ -6,8 +6,8 @@ use memio; use strings; export type frame = struct { - start: u16, - end: u16, + start: int, + end: int, }; export type list = struct { @@ -29,9 +29,10 @@ style: (*widget::style | void), items: str...) (list | tty::error) = { case void => yield tsz.rows - 1; }; + let end = end: int; - if (end > len(items)) { - end = len(items): u16; + if (end > len(items): int) { + end = len(items): int; }; return list { @@ -49,7 +50,7 @@ style: (*widget::style | void), items: str...) (list | tty::error) = { items = items, frame = frame { start = 0, - end = end, + end = end: int, }, }; }; |
