neovim/runtime
Gregory Anders d7651b27d5
fix(tui): move $COLORTERM check to _defaults.lua (#29197)
We currently check $COLORTERM in the TUI process to determine if the
terminal supports 24 bit color (truecolor). If $COLORTERM is "truecolor"
or "24bit" then we automatically assume that the terminal supports
truecolor, but if $COLORTERM is set to any other value we still query
the terminal.

The `rgb` flag of the UI struct is a boolean which only indicates
whether the UI supports truecolor, but does not have a 3rd state that we
can use to represent "we don't know if the UI supports truecolor". We
currently use `rgb=false` to represent this "we don't know" state, and
we use XTGETTCAP and DECRQSS queries to determine at runtime if the
terminal supports truecolor. However, if $COLORTERM is set to a value
besides "truecolor" or "24bit" (e.g. "256" or "16) that is a clear
indication that the terminal _does not_ support truecolor, so it is
incorrect to treat `rgb=false` as "we don't know" in that case.

Instead, in the TUI process we only check for the terminfo capabilities.
This must be done in the TUI process because we do not have access to
this information in the core Neovim process when `_defaults.lua` runs.
If the TUI cannot determine truecolor support from terminfo alone, we
set `rgb=false` to indicate "we don't know if the terminal supports
truecolor yet, keep checking". When we get to `_defaults.lua`, we can
then check $COLORTERM and only query the terminal if it is unset.

This means that users can explicitly opt out of truecolor determination
by setting `COLORTERM=256` (or similar) in their environment.
2024-06-05 08:27:56 -05:00
..
autoload vim-patch:98b73eb: runtime(netrw): prevent accidental data loss 2024-06-04 23:15:50 +02:00
colors fix(treesitter): document more standard highlight groups 2024-03-19 09:41:16 +01:00
compiler vim-patch:9.1.0442: hare runtime files outdated (#29011) 2024-05-26 07:11:50 +08:00
doc vim-patch:2a2c4ff: runtime(doc): clarify how fuzzy 'completeopt' should work 2024-06-05 15:08:31 +08:00
ftplugin fix(runtime): remove obsolete ftplugin/calender.lua 2024-06-04 12:54:34 +02:00
indent vim-patch:76174e7: runtime(asm): remove the indent plugin since it has too many issues 2024-05-27 06:59:01 +02:00
keymap vim-patch:caee7956a21a 2023-11-05 21:56:56 +01:00
lua fix(tui): move $COLORTERM check to _defaults.lua (#29197) 2024-06-05 08:27:56 -05:00
macros vim-patch:79230f027a25 2024-02-16 08:57:45 +01:00
pack/dist/opt vim-patch:62ccaa6: runtime(termdebug): check for gdb file/dir before using as buffer name (#28908) 2024-05-22 08:41:07 +08:00
plugin vim-patch:94043780196c (#28831) 2024-05-18 15:53:26 +08:00
queries build(deps): bump tree-sitter-query to v0.4.0 2024-05-26 12:38:20 +02:00
spell
syntax vim-patch:9.1.0464: no whitespace padding in commentstring option in ftplugins 2024-06-04 10:38:55 +02:00
tools
tutor docs: fix typos (#27868) 2024-03-28 09:32:32 +08:00
CMakeLists.txt build: various fixes 2024-02-01 12:06:55 +01:00
delmenu.vim
filetype.lua fix(filetype): use unexpanded file name (#27931) 2024-03-23 11:46:23 +08:00
ftoff.vim
ftplugin.vim
ftplugof.vim
indent.vim
indoff.vim
macmap.vim
makemenu.vim vim-patch:9.1.0013: Modula2 filetype support lacking (#27020) 2024-01-16 17:45:57 +00:00
menu.vim
mswin.vim vim-patch:45da32964d6e 2024-03-14 15:04:31 +08:00
neovim.ico
nvim.appdata.xml NVIM v0.10.0 2024-05-16 14:34:32 +02:00
nvim.desktop
nvim.png
optwin.vim vim-patch:9.1.0147: Cannot keep a buffer focused in a window 2024-03-11 11:38:13 +08:00
synmenu.vim vim-patch:9.1.0013: Modula2 filetype support lacking (#27020) 2024-01-16 17:45:57 +00:00