When WrapText is enabled, the computation of which rows to show is incorrect.
- Dominant language
- Go
- Stars
- 13.6k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
In function **"WrapCells"**, [utils.go](https://github.com/gizak/termui/blob/master/utils.go), you had a declaration of **"i"**. I‘m sure that you want to use it to save the count of line wrap to solve this issue, but you never used it. My suggestion is to have this function return **"wrappedCells"** as well as **"i"**, so that you can handle **"i"** properly in function **"Draw"**, in [list.go](https://github.com/gizak/termui/blob/master/widgets/list.go).

Contributor guide
No contributing guide indexed for this repository
Research direction
Read WrapCells in utils.go and then follow how Draw in widgets/list.go uses its result when WrapText is enabled. Verify the handling of the unused line-wrap count against the rows selected for display; done means wrapped list content shows the correct rows without changing behavior when wrapping is disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100