neovim/runtime/lua/nvim
Sean Dewar 7e24c45221
feat(health): detect tmux RGB support via client_termfeatures
Problem: On tmux v3.2+, the `terminal-features` option may be used to enable RGB
capabilities over `terminal-overrides`. However, `show-messages` cannot be used
to detect if RGB capabilities are enabled using `terminal-features`.

Solution: Try to use `display-message -p #{client_termfeatures}` instead.
The returned features include "RGB" if either "RGB" is set in
`terminal-features`, or if "Tc" or "RGB" is set in `terminal-overrides` (as
before).
Nothing is returned by tmux versions older than v3.2, so fallback to checking
`show-messages` in that case.

Also, un-Vimscriptify the previous logic a bit, and change the error message to
point to using the `terminal-features` option instead for newer tmux versions.
2023-01-16 15:30:57 +00:00
..
health.lua feat(health): detect tmux RGB support via client_termfeatures 2023-01-16 15:30:57 +00:00