Commit d6463ef
committed
fix: 修复菜单重绘时内容叠加问题
根因: tput sc/rc 在 macOS 终端不兼容,导致每次重绘在下方追加新行
修复: 使用 ANSI 转义码替代 tput sc/rc
- printf '\033[%dA' 上移光标
- printf '\033[2K' 清除行内容1 parent 2ac69f7 commit d6463ef
1 file changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
399 | 398 | | |
400 | 399 | | |
401 | 400 | | |
| |||
443 | 442 | | |
444 | 443 | | |
445 | 444 | | |
446 | | - | |
447 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
448 | 451 | | |
449 | 452 | | |
450 | 453 | | |
| |||
502 | 505 | | |
503 | 506 | | |
504 | 507 | | |
505 | | - | |
506 | 508 | | |
507 | 509 | | |
508 | 510 | | |
| |||
570 | 572 | | |
571 | 573 | | |
572 | 574 | | |
573 | | - | |
574 | | - | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
575 | 581 | | |
576 | 582 | | |
577 | 583 | | |
| |||
0 commit comments