* CSI Ps B * Cursor Down Ps Times (default = 1) (CUD). * * @vt: #Y CSI CUD "Cursor Down" "CSI Ps B" "Move cursor `Ps` times down (default=1)." * If the cursor would pass the bottom scroll margin, it will stop there.
(params: IParams)
| 918 | * If the cursor would pass the bottom scroll margin, it will stop there. |
| 919 | */ |
| 920 | public cursorDown(params: IParams): boolean { |
| 921 | // stop at scrollBottom |
| 922 | const diffToBottom = this._activeBuffer.scrollBottom - this._activeBuffer.y; |
| 923 | if (diffToBottom >= 0) { |
| 924 | this._moveCursor(0, Math.min(diffToBottom, params.params[0] || 1)); |
| 925 | } else { |
| 926 | this._moveCursor(0, params.params[0] || 1); |
| 927 | } |
| 928 | return true; |
| 929 | } |
| 930 | |
| 931 | /** |
| 932 | * CSI Ps C |
no test coverage detected