Avoid transitions in line_as_ansi on marks
This commit is contained in:
parent
2d870fc84a
commit
b7d12de0a7
@ -71,6 +71,7 @@ typedef enum { TILING, SCALED, MIRRORED } BackgroundImageLayout;
|
||||
#define DIM_SHIFT 8
|
||||
#define MARK_SHIFT 9
|
||||
#define ATTRS_MASK_WITHOUT_MARK 0xf9ff
|
||||
#define ATTRS_MASK_FOR_SGR (ATTRS_MASK_WITHOUT_MARK | ATTRS_MASK_WITHOUT_WIDTH)
|
||||
#define MARK_MASK 3
|
||||
#define COL_MASK 0xFFFFFFFF
|
||||
#define UTF8_ACCEPT 0
|
||||
|
||||
@ -298,7 +298,7 @@ line_as_ansi(Line *self, Py_UCS4 *buf, index_type buflen, bool *truncated, const
|
||||
|
||||
cell = &self->gpu_cells[pos];
|
||||
|
||||
#define CMP_ATTRS (cell->attrs & ATTRS_MASK_WITHOUT_WIDTH) != ((*prev_cell)->attrs & ATTRS_MASK_WITHOUT_WIDTH)
|
||||
#define CMP_ATTRS (cell->attrs & ATTRS_MASK_FOR_SGR) != ((*prev_cell)->attrs & ATTRS_MASK_FOR_SGR)
|
||||
#define CMP(x) cell->x != (*prev_cell)->x
|
||||
if (CMP_ATTRS || CMP(fg) || CMP(bg) || CMP(decoration_fg)) {
|
||||
const char *sgr = cell_as_sgr(cell, *prev_cell);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user