0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.3628: looking terminal colors is a bit slow

Problem:    Looking terminal colors is a bit slow.
Solution:   Cache the terminal colors. (closes #9130, closes #9058)
This commit is contained in:
Bram Moolenaar
2021-11-20 13:47:45 +00:00
parent cdf5fdb294
commit 87fd0924e2
43 changed files with 1056 additions and 212 deletions

View File

@@ -123,6 +123,14 @@ typedef struct {
#endif
#define COLOR_INVALID(x) ((x) == INVALCOLOR || (x) == CTERMCOLOR)
#ifdef FEAT_TERMINAL
# include "libvterm/include/vterm.h"
typedef struct {
VTermColor fg;
VTermColor bg;
} termcellcolor_T;
#endif
/*
* marks: positions in a file
* (a normal mark is a lnum/col pair, the same as a file position)
@@ -3619,6 +3627,9 @@ struct window_S
int w_nrwidth; // width of 'number' and 'relativenumber'
// column being used
#endif
#ifdef FEAT_TERMINAL
termcellcolor_T w_term_wincolor; // cache for term color of 'wincolor'
#endif
/*
* === end of cached values ===