1
0
forked from aniani/vim

patch 8.0.0760: terminal window colors wrong with 'termguicolors'

Problem:    Terminal window colors wrong with 'termguicolors'.
Solution:   Add 'termguicolors' support.
This commit is contained in:
Bram Moolenaar
2017-07-23 18:07:56 +02:00
parent 43da3e36b2
commit 065f41c814
4 changed files with 28 additions and 2 deletions

View File

@@ -33,7 +33,6 @@
* while, if the terminal window is visible, the screen contents is drawn.
*
* TODO:
* - color for 'termguicolors'
* - cursor flickers when moving the cursor
* - set buffer options to be scratch, hidden, nomodifiable, etc.
* - set buffer name to command, add (1) to avoid duplicates.
@@ -731,8 +730,14 @@ cell2attr(VTermScreenCell *cell)
#ifdef FEAT_TERMGUICOLORS
if (p_tgc)
{
/* TODO */
guicolor_T fg, bg;
fg = gui_get_rgb_color_cmn(cell->fg.red, cell->fg.green, cell->fg.blue);
bg = gui_get_rgb_color_cmn(cell->bg.red, cell->bg.green, cell->bg.blue);
return get_tgc_attr_idx(attr, fg, bg);
}
else
#endif
{
return get_cterm_attr_idx(attr, color2index(&cell->fg),