向下滚动 (SD)
在滚动区域顶部插入 `n` 行并 将现有行下移。
- 0x1B
- ESC
- 0x5B
- [
- ____
- n
- 0x54
- T
此序列在功能上等同于 将光标位置设到滚动区域顶部的 插入行 (IL)。 操作后光标位置必须与调用 SD 时保持不变。
此序列会取消待定换行状态。
printf "\033[1;1H" # move to top-left
printf "\033[0J" # clear screen
printf "ABC\n"
printf "DEF\n"
printf "GHI\n"
printf "\033[3;4r" # scroll region top/bottom
printf "\033[2;2H"
printf "\033[T"
|ABC_____|
|DEF_____|
|________|
|GHI_____|