Skip to content

Commit

Permalink
true Colour support (#431) fixed in scrollbuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
mintty committed Jun 22, 2015
1 parent dd8ac5b commit 43f0ed8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/term.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,10 @@ term_paint(void)
dirtyrect = false;
}

if (dispchars[j].chr != newchars[j].chr ||
(dispchars[j].attr.attr & ~DATTR_STARTRUN) != newchars[j].attr.attr) {
if (dispchars[j].chr != newchars[j].chr
|| (dispchars[j].attr.truefg != newchars[j].attr.truefg)
|| (dispchars[j].attr.truebg != newchars[j].attr.truebg)
|| (dispchars[j].attr.attr & ~DATTR_STARTRUN) != newchars[j].attr.attr) {
if (!dirtyrect) {
for (int k = laststart; k < j; k++)
dispchars[k].attr.attr |= ATTR_INVALID;
Expand Down
4 changes: 4 additions & 0 deletions src/termline.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ termchars_equal_override(termchar *a, termchar *b, uint bchr, cattr battr)
return false;
if ((a->attr.attr & ~DATTR_MASK) != (battr.attr & ~DATTR_MASK))
return false;
if (a->attr.truefg != battr.truefg)
return false;
if (a->attr.truebg != battr.truebg)
return false;
while (a->cc_next || b->cc_next) {
if (!a->cc_next || !b->cc_next)
return false; /* one cc-list ends, other does not */
Expand Down
4 changes: 2 additions & 2 deletions src/winclip.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ win_copy(const wchar *data, uint *attrs, int len)

/*
* Add colour palette
* {\colortbl ;\red255\green0\blue0;\red0\green0\blue128;}
* {\colortbl;\red255\green0\blue0;\red0\green0\blue128;...}
*/

/*
Expand Down Expand Up @@ -173,7 +173,7 @@ win_copy(const wchar *data, uint *attrs, int len)
* Finally - Write the colour table
*/
rtf = renewn(rtf, rtfsize + (numcolours * 25));
strcat(rtf, "{\\colortbl ;");
strcat(rtf, "{\\colortbl;");
rtflen = strlen(rtf);

for (int i = 0; i < COLOUR_NUM; i++) {
Expand Down
2 changes: 1 addition & 1 deletion wiki/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* Enabled character attributes italic (#418, #152) and strikeout.
* True Colour support (#431) (using 38;2;r;g;b m) alpha.
* True Colour support (#431) (using 38;2;r;g;b m).
* Added MSYS setup hint (#426).
* Fixed CSI 8;...t handling of default and zero values (issue #408).
* Reporting mode for font changes (issue #355).
Expand Down

0 comments on commit 43f0ed8

Please sign in to comment.