rivo / tview

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

Regression: Colors in autocomplete list are incorrect #1050

Closed gpanders closed 3 weeks ago

gpanders commented 3 weeks ago

Problem

Using SetAutocompleteStyles(tcell.ColorBlack, tcell.StyleDefault, tcell.StyleDefault.Reverse(true)) the background color of the autocomplete window should be ANSI color 0 (black) and the foreground color should use the terminal's default foreground color. Selected items should be reversed.

With my terminal color scheme, it looks like this before 03bdc867bee4ce7355079090c396d9ec861fc4bb:

Screenshot 2024-11-03 at 12 32 38 PM

After 03bdc867bee4ce7355079090c396d9ec861fc4bb, it looks like this:

Screenshot 2024-11-03 at 12 33 36 PM

Note that while the background of the window is still using color 0, the background color of the text is using the Default color (the terminal's background color rather than color 0).

gpanders commented 3 weeks ago

Perhaps not a regression, but just a bug fix. Updating my code to use SetAutocompleteStyles(tcell.ColorBlack, tcell.StyleDefault.Background(tcell.ColorBlack), tcell.StyleDefault.Reverse(true)) makes it work as expected.