Browse Source

st-bright-bold-text: small style fix

master
Von Random 1 month ago
parent
commit
074c40762d
1 changed files with 8 additions and 11 deletions
  1. 8
    11
      st-bright-bold-text.patch

+ 8
- 11
st-bright-bold-text.patch View File

@@ -24,27 +24,25 @@ index ede7ae6..6e3fabe 100644
24 24
  			term.c.attr.mode &= ~(
25 25
  				ATTR_BOLD       |
26 26
  				ATTR_FAINT      |
27
-@@ -1365,6 +1366,9 @@ tsetattr(int *attr, int l)
27
+@@ -1365,6 +1366,8 @@ tsetattr(int *attr, int l)
28 28
  			break;
29 29
  		case 1:
30 30
  			term.c.attr.mode |= ATTR_BOLD;
31
-+			if (!term.c.attr.colored) {
31
++			if (!term.c.attr.colored)
32 32
 +				term.c.attr.fg = defaultbd;
33
-+			}
34 33
  			break;
35 34
  		case 2:
36 35
  			term.c.attr.mode |= ATTR_FAINT;
37
-@@ -1391,6 +1395,9 @@ tsetattr(int *attr, int l)
36
+@@ -1391,6 +1395,8 @@ tsetattr(int *attr, int l)
38 37
  			break;
39 38
  		case 22:
40 39
  			term.c.attr.mode &= ~(ATTR_BOLD | ATTR_FAINT);
41
-+			if (!term.c.attr.colored) {
40
++			if (!term.c.attr.colored)
42 41
 +				term.c.attr.fg = defaultfg;
43
-+			}
44 42
  			break;
45 43
  		case 23:
46 44
  			term.c.attr.mode &= ~ATTR_ITALIC;
47
-@@ -1411,11 +1418,18 @@ tsetattr(int *attr, int l)
45
+@@ -1411,11 +1416,17 @@ tsetattr(int *attr, int l)
48 46
  			term.c.attr.mode &= ~ATTR_STRUCK;
49 47
  			break;
50 48
  		case 38:
@@ -57,15 +55,14 @@ index ede7ae6..6e3fabe 100644
57 55
  		case 39:
58 56
 -			term.c.attr.fg = defaultfg;
59 57
 +			term.c.attr.colored = 0;
60
-+			if (term.c.attr.mode & ATTR_BOLD) {
58
++			if (term.c.attr.mode & ATTR_BOLD)
61 59
 +				term.c.attr.fg = defaultbd;
62
-+			} else {
60
++			else
63 61
 +				term.c.attr.fg = defaultfg;
64
-+			}
65 62
  			break;
66 63
  		case 48:
67 64
  			if ((idx = tdefcolor(attr, &i, l)) >= 0)
68
-@@ -1426,10 +1440,12 @@ tsetattr(int *attr, int l)
65
+@@ -1426,10 +1437,12 @@ tsetattr(int *attr, int l)
69 66
  			break;
70 67
  		default:
71 68
  			if (BETWEEN(attr[i], 30, 37)) {

Loading…
Cancel
Save