diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-16 11:25:45 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-16 11:25:45 +0000 |
| commit | 770c5e97ddde7309e6f48a3ecc0068427d01792c (patch) | |
| tree | ecd081bab87799c7aff7e67787c7ba050cc528d2 | |
| parent | csi: add back 'blink' attribute (diff) | |
csi: move 'dim' attribute from 'vt' to cell attributes
| -rw-r--r-- | csi.c | 5 | ||||
| -rw-r--r-- | terminal.h | 2 |
2 files changed, 3 insertions, 4 deletions
@@ -111,7 +111,6 @@ static void sgr_reset(struct terminal *term) { memset(&term->vt.attrs, 0, sizeof(term->vt.attrs)); - term->vt.dim = false; term->vt.attrs.foreground = term->foreground; term->vt.attrs.background = term->background; } @@ -160,7 +159,7 @@ csi_sgr(struct terminal *term) break; case 1: term->vt.attrs.bold = true; break; - case 2: term->vt.dim = true; break; + case 2: term->vt.attrs.dim = true; break; case 3: term->vt.attrs.italic = true; break; case 4: term->vt.attrs.underline = true; break; case 5: term->vt.attrs.blink = true; break; @@ -170,7 +169,7 @@ csi_sgr(struct terminal *term) case 9: term->vt.attrs.strikethrough = true; break; case 21: term->vt.attrs.bold = false; break; - case 22: term->vt.attrs.bold = term->vt.dim = false; break; + case 22: term->vt.attrs.bold = term->vt.attrs.dim = false; break; case 23: term->vt.attrs.italic = false; break; case 24: term->vt.attrs.underline = false; break; case 25: term->vt.attrs.blink = false; break; @@ -52,6 +52,7 @@ struct rgb { float r, g, b; }; * misses) */ struct attributes { uint8_t bold:1; + uint8_t dim:1; uint8_t italic:1; uint8_t underline:1; uint8_t strikethrough:1; @@ -134,7 +135,6 @@ struct vt { } utf8; struct attributes attrs; struct attributes saved_attrs; - bool dim; }; struct kbd { |
