X Tutup
Skip to content

Commit 43f0ed8

Browse files
committed
true Colour support (#431) fixed in scrollbuffer
1 parent dd8ac5b commit 43f0ed8

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

src/term.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,10 @@ term_paint(void)
739739
dirtyrect = false;
740740
}
741741

742-
if (dispchars[j].chr != newchars[j].chr ||
743-
(dispchars[j].attr.attr & ~DATTR_STARTRUN) != newchars[j].attr.attr) {
742+
if (dispchars[j].chr != newchars[j].chr
743+
|| (dispchars[j].attr.truefg != newchars[j].attr.truefg)
744+
|| (dispchars[j].attr.truebg != newchars[j].attr.truebg)
745+
|| (dispchars[j].attr.attr & ~DATTR_STARTRUN) != newchars[j].attr.attr) {
744746
if (!dirtyrect) {
745747
for (int k = laststart; k < j; k++)
746748
dispchars[k].attr.attr |= ATTR_INVALID;

src/termline.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ termchars_equal_override(termchar *a, termchar *b, uint bchr, cattr battr)
138138
return false;
139139
if ((a->attr.attr & ~DATTR_MASK) != (battr.attr & ~DATTR_MASK))
140140
return false;
141+
if (a->attr.truefg != battr.truefg)
142+
return false;
143+
if (a->attr.truebg != battr.truebg)
144+
return false;
141145
while (a->cc_next || b->cc_next) {
142146
if (!a->cc_next || !b->cc_next)
143147
return false; /* one cc-list ends, other does not */

src/winclip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ win_copy(const wchar *data, uint *attrs, int len)
120120

121121
/*
122122
* Add colour palette
123-
* {\colortbl ;\red255\green0\blue0;\red0\green0\blue128;}
123+
* {\colortbl;\red255\green0\blue0;\red0\green0\blue128;...}
124124
*/
125125

126126
/*
@@ -173,7 +173,7 @@ win_copy(const wchar *data, uint *attrs, int len)
173173
* Finally - Write the colour table
174174
*/
175175
rtf = renewn(rtf, rtfsize + (numcolours * 25));
176-
strcat(rtf, "{\\colortbl ;");
176+
strcat(rtf, "{\\colortbl;");
177177
rtflen = strlen(rtf);
178178

179179
for (int i = 0; i < COLOUR_NUM; i++) {

wiki/Changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
* Enabled character attributes italic (#418, #152) and strikeout.
2-
* True Colour support (#431) (using 38;2;r;g;b m) alpha.
2+
* True Colour support (#431) (using 38;2;r;g;b m).
33
* Added MSYS setup hint (#426).
44
* Fixed CSI 8;...t handling of default and zero values (issue #408).
55
* Reporting mode for font changes (issue #355).

0 commit comments

Comments
 (0)
X Tutup