mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
fix(runtime): "E121 Undefined variable s:termguicolors" #32209
Problem: dircolors syntaxt termguicolors support was not taking dynamic termguicolors changes into account. Solution: initializing missing script-internal data on dynamic termguicolors change.
This commit is contained in:
@ -85,6 +85,9 @@ endfunction
|
||||
function! s:get_hi_str(color, place) abort
|
||||
if a:color >= 0 && a:color <= 255
|
||||
if has('gui_running') || &termguicolors
|
||||
if ! exists("s:termguicolors")
|
||||
call s:set_guicolors()
|
||||
endif
|
||||
return ' gui' . a:place . '=' . s:termguicolors[a:color]
|
||||
elseif a:color <= 7 || &t_Co == 256 || &t_Co == 88
|
||||
return ' cterm' . a:place . '=' . a:color
|
||||
|
Reference in New Issue
Block a user