aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--csi.c5
-rw-r--r--terminal.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/csi.c b/csi.c
index 8a5ecbb2..56630d90 100644
--- a/csi.c
+++ b/csi.c
@@ -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;
diff --git a/terminal.h b/terminal.h
index f370f110..bbc6c0ad 100644
--- a/terminal.h
+++ b/terminal.h
@@ -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 {