* CSI Ps K Erase in Line (EL). * Ps = 0 -> Erase to Right (default). * Ps = 1 -> Erase to Left. * Ps = 2 -> Erase All. * CSI ? Ps K * Erase in Line (DECSEL). * Ps = 0 -> Selective Erase to Right (default). * Ps = 1 -> Selective Erase to Left. *
(params: IParams, respectProtect: boolean = false)
| 1283 | * @vt: #Y CSI DECSEL "Selective Erase In Line" "CSI ? Ps K" "Same as EL with respecting protecting flag." |
| 1284 | */ |
| 1285 | public eraseInLine(params: IParams, respectProtect: boolean = false): boolean { |
| 1286 | this._restrictCursor(this._bufferService.cols); |
| 1287 | switch (params.params[0]) { |
| 1288 | case 0: |
| 1289 | this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0, respectProtect); |
| 1290 | break; |
| 1291 | case 1: |
| 1292 | this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, false, respectProtect); |
| 1293 | break; |
| 1294 | case 2: |
| 1295 | this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, true, respectProtect); |
| 1296 | break; |
| 1297 | } |
| 1298 | this._dirtyRowTracker.markDirty(this._activeBuffer.y); |
| 1299 | return true; |
| 1300 | } |
| 1301 | |
| 1302 | /** |
| 1303 | * CSI Ps L |
no test coverage detected