vim-patch:8.0.1600: crash when setting t_Co to zero when 'termguicolors' is set

Problem:    Crash when setting t_Co to zero when 'termguicolors' is set.
Solution:   Use IS_CTERM instead of checking the number of colors.
            (closes vim/vim#2710)
f708ac592f
This commit is contained in:
Jan Edmund Lazo 2018-07-14 14:29:53 -04:00
parent 11bd0b8870
commit e105e1242a

View File

@ -514,3 +514,17 @@ func Test_highlight_eol_on_diff()
bwipe!
diffoff
endfunc
func Test_termguicolors()
if !exists('+termguicolors')
return
endif
" Basic test that setting 'termguicolors' works with one color.
set termguicolors
redraw
set t_Co=1
redraw
set t_Co=0
redraw
endfunc