rivo / tview

Terminal UI library with rich, interactive widgets — written in Golang
MIT License
10.33k stars 545 forks source link

Try to fix #954 #960

Closed Souheab closed 2 months ago

Souheab commented 3 months ago

This PR attempts to fix #954

rivo commented 2 months ago

The "print text first, then reverse colours on selections" method was still a leftover from the first version of this package. As you correctly noted, this failed in some cases. But the fix should not have been to keep this (IMHO bad) method around and patch it somehow but to use styles correctly by printing the selected text with the "selected style", then (optionally) extending the line with that same style.

By working on this, I also came across a few other bugs in the package which I fixed here as well.