Mercurial > vim
comparison src/libvterm/src/pen.c @ 12973:418941f0df08 v8.0.1362
patch 8.0.1362: terminal window colors wrong when using Terminal highlighting
commit https://github.com/vim/vim/commit/a7c54cfcf825e8e99db03f4ccdb1a32cd0714c52
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 1 21:07:20 2017 +0100
patch 8.0.1362: terminal window colors wrong when using Terminal highlighting
Problem: Terminal window colors wrong when using Terminal highlighting.
Solution: Set ansi_index when setting the default color. Also cache the
color index for Terminal. (Ozaki Kiichi, closes #2393)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 01 Dec 2017 21:15:05 +0100 |
parents | c5bccd50100e |
children | 9f857e6310b6 |
comparison
equal
deleted
inserted
replaced
12972:8ce5ee69c0bb | 12973:418941f0df08 |
---|---|
211 } | 211 } |
212 | 212 |
213 void vterm_state_set_default_colors(VTermState *state, const VTermColor *default_fg, const VTermColor *default_bg) | 213 void vterm_state_set_default_colors(VTermState *state, const VTermColor *default_fg, const VTermColor *default_bg) |
214 { | 214 { |
215 state->default_fg = *default_fg; | 215 state->default_fg = *default_fg; |
216 state->default_fg.ansi_index = VTERM_ANSI_INDEX_DEFAULT; | |
217 state->default_bg = *default_bg; | 216 state->default_bg = *default_bg; |
218 state->default_bg.ansi_index = VTERM_ANSI_INDEX_DEFAULT; | |
219 } | 217 } |
220 | 218 |
221 void vterm_state_set_palette_color(VTermState *state, int index, const VTermColor *col) | 219 void vterm_state_set_palette_color(VTermState *state, int index, const VTermColor *col) |
222 { | 220 { |
223 if(index >= 0 && index < 16) | 221 if(index >= 0 && index < 16) |