浏览代码

* Add linebreaks to the ANSI exporter for better readability, and use

the save/load cursor position trick to ignore them.
tags/v0.99.beta14
Sam Hocevar sam 20 年前
父节点
当前提交
ca5c87ae1b
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. +5
    -1
      cucul/export.c

+ 5
- 1
cucul/export.c 查看文件

@@ -319,7 +319,11 @@ static void export_ansi(cucul_canvas_t *cv, cucul_buffer_t *ex)
prevbg = bg; prevbg = bg;
} }


if(cv->width != 80)
if(cv->width == 80)
{
cur += sprintf(cur, "\033[s\n\033[u");
}
else
{ {
cur += sprintf(cur, "\033[0m\r\n"); cur += sprintf(cur, "\033[0m\r\n");
prevfg = -1; prevfg = -1;


正在加载...
取消
保存