chz^3 GitHub пре 2 година
родитељ
комит
2f81c54422
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 измењених фајлова са 3 додато и 3 уклоњено
  1. +3
    -3
      caca/codec/text.c

+ 3
- 3
caca/codec/text.c Прегледај датотеку

@@ -709,8 +709,7 @@ void *_export_irc(caca_canvas_t const *cv, size_t *bytes)
bg = ansibg < 0x10 ? palette[ansibg] : 0x10;

/* TODO: optimise series of same fg / same bg
* don't change fg value if ch == ' '
* make sure the \x03,%d trick works everywhere */
* don't change fg value if ch == ' ' */
if(bg != prevbg || fg != prevfg)
{
int need_escape = 0;
@@ -733,7 +732,8 @@ void *_export_irc(caca_canvas_t const *cv, size_t *bytes)
else
{
if(fg == 0x10)
cur += sprintf(cur, "\x0f\x03,%d", bg);
/* fg must be provided; 99 is the default color for a line */
cur += sprintf(cur, "\x0399,%d", bg);
else
cur += sprintf(cur, "\x03%d,%d", fg, bg);
}


Loading…
Откажи
Сачувај