summaryrefslogtreecommitdiffstatshomepage
path: root/runtime
diff options
context:
space:
mode:
authorMeriel Luna Mittelbach <lunarlambda@gmail.com>2025-08-28 05:01:07 +0200
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2025-08-28 04:25:15 +0000
commitd70d469c048d84672113aa9da0bf7a1dcf82c645 (patch)
treee583ebea77f47cff428a85ed5b7c58f460fdf6b6 /runtime
parent99817471d783945c4e13da534b8b8da4a08487b2 (diff)
fix(health): accept TERM=tmux-direct #35511
tmux-direct is functionally the same as tmux-256color, except it directly reports 24-bit color and how to set them (setaf/setab) via ncurses 6.x's extended terminfo format. (cherry picked from commit a33284c2c068a9204330bc941e274b1f5bd9f5c6)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/lua/vim/health/health.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/lua/vim/health/health.lua b/runtime/lua/vim/health/health.lua
index 8f897b756c..6418d26fba 100644
--- a/runtime/lua/vim/health/health.lua
+++ b/runtime/lua/vim/health/health.lua
@@ -318,9 +318,11 @@ local function check_tmux()
'$TERM differs from the tmux `default-terminal` setting. Colors might look wrong.',
{ '$TERM may have been set by some rc (.bashrc, .zshrc, ...).' }
)
- elseif not vim.regex([[\v(tmux-256color|screen-256color)]]):match_str(vim.env.TERM) then
+ elseif
+ not vim.regex([[\v(tmux-256color|tmux-direct|screen-256color)]]):match_str(vim.env.TERM)
+ then
health.error(
- '$TERM should be "screen-256color" or "tmux-256color" in tmux. Colors might look wrong.',
+ '$TERM should be "screen-256color", "tmux-256color", or "tmux-direct" in tmux. Colors might look wrong.',
{
'Set default-terminal in ~/.tmux.conf:\nset-option -g default-terminal "screen-256color"',
suggest_faq,