Skip to content

v0.15.0 - 修复菜单重绘叠加问题

Choose a tag to compare

@MomoLawson MomoLawson released this 01 Apr 16:44

修复菜单重绘时内容叠加问题

根因: tput sc/rc 在 macOS 终端不兼容,导致每次重绘在下方追加新行

修复: 使用 ANSI 转义码替代 tput sc/rc

  • printf '\033[%dA' 上移光标
  • printf '\033[2K' 清除行内容