mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #332] Integer divide by zero when setting proportion of last flex item to 0 #253
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#253
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fajuchem on GitHub (Aug 9, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/332
Hello, I'm using flex as the main window in the app, so what I need to do is hide some of the items of the flex, I archived it setting the the item proportion to 0 so the item became hidden, which works great, except when you try to set the proportion to 0 of the last item added in the flex.
Same thing happen if you try to resize the last item with:
You gonna get:
panic: runtime error: integer divide by zero [recovered] panic: runtime error: integer divide by zero@rivo commented on GitHub (Oct 17, 2019):
Thanks. I added a fix. But I should note that the documentation does not allow this: