mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #1050] Regression: Colors in autocomplete list are incorrect #761
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#761
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 @gpanders on GitHub (Nov 3, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/1050
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:
After 03bdc867bee4ce7355079090c396d9ec861fc4bb, it looks like this:
Note that while the background of the window is still using color 0, the background color of the text is using the
Defaultcolor (the terminal's background color rather than color 0).@gpanders commented on GitHub (Nov 3, 2024):
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.