'termguicolors' #4690

TODO: Only works at startup (i.e., in the user's init.vim/vimrc/--cmd),
      but it should probably work at any time.

---

patch 7.4.1799
Problem:    'guicolors' is a confusing option name.
Solution:   Use 'termguicolors' instead. (Hirohito Higashi)
61be73bb0f

patch 7.4.1806
Problem:    'termguicolors' option missing from the options window.
Solution:   Add the entry.
8e3d1b6326

patch 7.4.1808
Problem:    Using wrong feature name to check for 'termguicolors'.
Solution:   Use the right feature name. (Ken Takata)
8a24b794b8

patch 7.4.1809
Problem:    Using wrong short option name for 'termguicolors'.
Solution:   Use the option name.
868cfc19bb
This commit is contained in:
Shougo Matsushita
2016-05-02 07:34:06 +09:00
committed by Justin M. Keyes
parent a5a1768918
commit acc5d08b37
10 changed files with 48 additions and 24 deletions

View File

@@ -10684,6 +10684,7 @@ static void f_has(typval_T *argvars, typval_T *rettv)
"tablineat",
"tag_binary",
"tag_old_static",
"termguicolors",
"termresponse",
"textobjects",
"title",

View File

@@ -619,6 +619,7 @@ EXTERN long p_titlelen; ///< 'titlelen'
EXTERN char_u *p_titleold; ///< 'titleold'
EXTERN char_u *p_titlestring; ///< 'titlestring'
EXTERN char_u *p_tsr; ///< 'thesaurus'
EXTERN bool p_tgc; ///< 'termguicolors'
EXTERN int p_ttimeout; ///< 'ttimeout'
EXTERN long p_ttm; ///< 'ttimeoutlen'
EXTERN char_u *p_udir; ///< 'undodir'

View File

@@ -2382,6 +2382,14 @@ return {
redraw={'everything'},
defaults={if_true={vi=""}}
},
{
full_name='termguicolors', abbreviation='tgc',
type='bool', scope={'global'},
vi_def=false,
redraw={'everything'},
varname='p_tgc',
defaults={if_true={vi=false}}
},
{
full_name='terse',
type='bool', scope={'global'},

View File

@@ -81,7 +81,7 @@ UI *tui_start(void)
{
UI *ui = xcalloc(1, sizeof(UI));
ui->stop = tui_stop;
ui->rgb = os_getenv("NVIM_TUI_ENABLE_TRUE_COLOR") != NULL;
ui->rgb = p_tgc;
ui->resize = tui_resize;
ui->clear = tui_clear;
ui->eol_clear = tui_eol_clear;

View File

@@ -69,6 +69,10 @@ static char *features[] = {
// clang-format off
static int included_patches[] = {
1809,
1808,
1806,
1799,
1757,
1755,
1753,