瀏覽代碼

Merge 3c4d987660 into f42aa68fc7

pull/68/merge
chz^3 GitHub 2 年之前
父節點
當前提交
2f81c54422
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 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…
取消
儲存