summaryrefslogtreecommitdiff
path: root/st-bright-bold-text.patch
diff options
context:
space:
mode:
Diffstat (limited to 'st-bright-bold-text.patch')
-rw-r--r--st-bright-bold-text.patch35
1 files changed, 24 insertions, 11 deletions
diff --git a/st-bright-bold-text.patch b/st-bright-bold-text.patch
index 0640f07..e18a758 100644
--- a/st-bright-bold-text.patch
+++ b/st-bright-bold-text.patch
@@ -12,13 +12,19 @@
unsigned int defaultbg = 0;
static unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
+diff --git a/st.c b/st.c
+index ede7ae6..e67ef3b 100644
--- a/st.c
+++ b/st.c
-@@ -1378,9 +1378,12 @@ tsetattr(int *attr, int l)
- ATTR_STRUCK );
- term.c.attr.fg = defaultfg;
- term.c.attr.bg = defaultbg;
+@@ -1351,6 +1351,7 @@ tsetattr(int *attr, int l)
+ for (i = 0; i < l; i++) {
+ switch (attr[i]) {
+ case 0:
+ term.c.attr.colored = 0;
+ term.c.attr.mode &= ~(
+ ATTR_BOLD |
+ ATTR_FAINT |
+@@ -1365,6 +1366,8 @@ tsetattr(int *attr, int l)
break;
case 1:
term.c.attr.mode |= ATTR_BOLD;
@@ -27,35 +33,42 @@
break;
case 2:
term.c.attr.mode |= ATTR_FAINT;
-@@ -1427,11 +1430,14 @@ tsetattr(int *attr, int l)
+@@ -1411,11 +1414,18 @@ tsetattr(int *attr, int l)
term.c.attr.mode &= ~ATTR_STRUCK;
break;
case 38:
- if ((idx = tdefcolor(attr, &i, l)) >= 0)
+ if ((idx = tdefcolor(attr, &i, l)) >= 0) {
- term.c.attr.fg = idx;
+ term.c.attr.colored = 1;
+ term.c.attr.fg = idx;
+ }
break;
case 39:
- term.c.attr.fg = defaultfg;
+- term.c.attr.fg = defaultfg;
+ term.c.attr.colored = 0;
++ if (term.c.attr.mode & ATTR_BOLD) {
++ term.c.attr.fg = defaultbd;
++ } else {
++ term.c.attr.fg = defaultfg;
++ }
break;
case 48:
if ((idx = tdefcolor(attr, &i, l)) >= 0)
-@@ -1443,10 +1449,12 @@ tsetattr(int *attr, int l)
+@@ -1426,10 +1436,12 @@ tsetattr(int *attr, int l)
+ break;
default:
if (BETWEEN(attr[i], 30, 37)) {
- term.c.attr.fg = attr[i] - 30;
+ term.c.attr.colored = 1;
+ term.c.attr.fg = attr[i] - 30;
} else if (BETWEEN(attr[i], 40, 47)) {
term.c.attr.bg = attr[i] - 40;
} else if (BETWEEN(attr[i], 90, 97)) {
- term.c.attr.fg = attr[i] - 90 + 8;
+ term.c.attr.colored = 1;
+ term.c.attr.fg = attr[i] - 90 + 8;
} else if (BETWEEN(attr[i], 100, 107)) {
term.c.attr.bg = attr[i] - 100 + 8;
- } else {
+diff --git a/st.h b/st.h
+index 4da3051..06de8ac 100644
--- a/st.h
+++ b/st.h
@@ -65,6 +65,7 @@ typedef struct {