summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-23 18:07:56 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-23 18:07:56 +0200
commit065f41c8143271d1af7c8f5d14a59e29bf7ecdf3 (patch)
tree882fdc9e6dcafd380a6efce8670f0c2345cde44a /src/terminal.c
parent43da3e36b21b9df20e4b2f380df76bbc7e91a965 (diff)
downloadvim-git-8.0.0760.tar.gz
patch 8.0.0760: terminal window colors wrong with 'termguicolors'v8.0.0760
Problem: Terminal window colors wrong with 'termguicolors'. Solution: Add 'termguicolors' support.
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/terminal.c b/src/terminal.c
index 95b16c946..3f1a91d15 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -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),