Trevor Slocum
Trevor Slocum
Hello, I would like to take a shot at implementing this. Since you asked to discuss the structure before submitting a PR, please see the initial work I've done: -...

Hey @nojus297, that should be possible. I don't plan on implementing more complex rendering/styling myself but would gladly merge such changes into [cview](https://gitlab.com/tslocum/cview) if you or someone else proposes them....
Thanks. I agree that providing width/height directly is best. I've updated this PR with that change as well as clarifying that the screen is cleared and the application is redrawn...
Hey @klim0v. If you'd like to use this feature now, as well as some other features and fixes not yet merged into tview, please see my fork [cview](https://gitlab.com/tslocum/cview).
Thanks. I also don't know the possible extent of corruption. I've updated this to use QueueUpdate instead.
I agree with rivo, but I'm open to adding this functionality to [cview](https://gitlab.com/tslocum/cview) if you or anyone else is interested in working on an initial implementation (I'm glad to help).
I've created benchmarks for writing to and drawing TextViews (submitted as #356) and compared the results before and after applying these optimizations. --- `go test -run=NONE -bench=. -count=3` [Before](https://paste.sr.ht/%7Etslocum/97a85e91a875a4038364b4c2c757cd40d67388c4#before-applying-textview-optimizations) [After](https://paste.sr.ht/%7Etslocum/97a85e91a875a4038364b4c2c757cd40d67388c4#after-applying-textview-optimizations)...
Based on the benchmark results, these optimizations: * Increase the amount of time it takes to write to unwrapped TextViews by 350% * Do not affect the amount of time...
Thanks for your feedback. I've updated the tests and benchmarks to include cases where a small amount of data is written to a TextView that contains a lot of data....