Optimize implementation of clear screen escape code

This commit is contained in:
Kovid Goyal
2024-01-18 12:30:30 +05:30
parent b48b70aedf
commit 89c431a624
5 changed files with 27 additions and 10 deletions

View File

@@ -372,6 +372,8 @@ cursor_to_attrs(const Cursor *c, const uint16_t width) {
return ans;
}
#define cursor_as_gpu_cell(cursor) {.attrs=cursor_to_attrs(cursor, 0), .fg=(cursor->fg & COL_MASK), .bg=(cursor->bg & COL_MASK), .decoration_fg=cursor->decoration_fg & COL_MASK}
static inline void
attrs_to_cursor(const CellAttrs attrs, Cursor *c) {
c->decoration = attrs.decoration; c->bold = attrs.bold; c->italic = attrs.italic;