config: add colors.alpha-non-whitespace option

This commit is contained in:
Joschua Kesper 2024-05-26 21:37:57 +02:00
parent 0bf5a7e902
commit 50868caece
No known key found for this signature in database
GPG key ID: E683C3A5BC5C8BF9
8 changed files with 39 additions and 1 deletions

View file

@ -2,6 +2,7 @@
#include <string.h>
#include <wctype.h>
#include <ctype.h>
#include <unistd.h>
#include <signal.h>
@ -572,8 +573,10 @@ render_cell(struct terminal *term, pixman_image_t *pix, pixman_region32_t *damag
* NOTE: if changing this, also update render_margin()
*/
xassert(alpha == 0xffff);
} else {
} else if (isspace(cell->wc) || cell->wc == 0) {
alpha = term->colors.alpha;
} else {
alpha = term->colors.alpha_non_whitespace;
}
}
}