Skip to content

Commit

Permalink
Optimization of t_Co
Browse files Browse the repository at this point in the history
  • Loading branch information
Nobuhiro Takasaki committed Oct 4, 2017
1 parent f131273 commit cab5437
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/option.c
Expand Up @@ -8619,6 +8619,9 @@ set_bool_option(
highlight_gui_started();
# if !defined(FEAT_GUI)
control_console_color_rgb();
/* reset t_Co */
if (STRCMP(T_NAME, "win32") == 0)
set_termname(T_NAME);
# endif
}
#endif
Expand Down
5 changes: 5 additions & 0 deletions src/term.c
Expand Up @@ -1993,6 +1993,11 @@ set_termname(char_u *term)
may_req_termresponse();
#endif

#if defined(WIN3264) && !defined(FEAT_GUI) && defined(FEAT_TERMGUICOLORS)
if (STRCMP(term, "win32") == 0)
set_color_count((p_tgc) ? 256 : 16);
#endif

return OK;
}

Expand Down

0 comments on commit cab5437

Please sign in to comment.