Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 43356a4

Browse filesBrowse files
authored
health: check if tmux enabled true colors (#9929)
References #7764
1 parent 3f71218 commit 43356a4
Copy full SHA for 43356a4

File tree

Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed

‎runtime/autoload/health/nvim.vim

Copy file name to clipboardExpand all lines: runtime/autoload/health/nvim.vim
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,17 @@ function! s:check_tmux() abort
170170
\ ["Set default-terminal in ~/.tmux.conf:\nset-option -g default-terminal \"screen-256color\"",
171171
\ s:suggest_faq])
172172
endif
173+
174+
" check for RGB capabilities
175+
let info = system('tmux server-info')
176+
let has_tc = stridx(info, " Tc: (flag) true") != -1
177+
let has_rgb = stridx(info, " RGB: (flag) true") != -1
178+
if !has_tc && !has_rgb
179+
call health#report_warn(
180+
\ "Neither Tc nor RGB capability set. True colors are disabled. |'termguicolors'| won't work properly.",
181+
\ ["Put this in your ~/.tmux.conf and replace XXX by your $TERM outside of tmux:\nset-option -sa terminal-overrides ',XXX:RGB'",
182+
\ "For older tmux versions use this instead:\nset-option -ga terminal-overrides ',XXX:Tc'"])
183+
endif
173184
endfunction
174185

175186
function! s:check_terminal() abort

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.