diff options
| author | Julian Hurst <julian.hurst@digdash.com> | 2025-03-25 14:28:20 +0100 |
|---|---|---|
| committer | Julian Hurst <julian.hurst@digdash.com> | 2025-03-25 14:28:20 +0100 |
| commit | 97d55df16cbc076183c65f2041aaff184b586239 (patch) | |
| tree | fd4a92b3b9a111648150f27425e33200746dfaf4 /tui/widget/widget.ha | |
| parent | d531bc786a3da309d10f3bdf62ebebda345e5205 (diff) | |
| download | hare-tui-97d55df16cbc076183c65f2041aaff184b586239.tar.gz | |
Don't spare last terminal row
Diffstat (limited to 'tui/widget/widget.ha')
| -rw-r--r-- | tui/widget/widget.ha | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tui/widget/widget.ha b/tui/widget/widget.ha index 93f3a3e..9da7525 100644 --- a/tui/widget/widget.ha +++ b/tui/widget/widget.ha @@ -1,4 +1,4 @@ -use tui; +se tui; use fmt; use unix::tty; use io; @@ -185,7 +185,10 @@ export fn print(w: *widget) void = { yield strings::dup(sstyle[i]); }; defer free(line); - memio::concat(&st, line, NEWLINE)!; + memio::concat(&st, line)!; + if (i < len(sstyle) - 1) { + memio::concat(&st, NEWLINE)!; + }; }; const joined = memio::string(&st)!; |
