CSI n Device Status Report (DSR)
(params []string)
| 320 | // CSI n |
| 321 | // Device Status Report (DSR) |
| 322 | func (t *Terminal) csiDeviceStatusReportHandler(params []string) (renderRequired bool) { |
| 323 | |
| 324 | if len(params) == 0 { |
| 325 | return false |
| 326 | } |
| 327 | |
| 328 | switch params[0] { |
| 329 | case "5": |
| 330 | t.WriteToPty([]byte("\x1b[0n")) // everything is cool |
| 331 | case "6": // report cursor position |
| 332 | t.WriteToPty([]byte(fmt.Sprintf( |
| 333 | "\x1b[%d;%dR", |
| 334 | t.GetActiveBuffer().CursorLine()+1, |
| 335 | t.GetActiveBuffer().CursorColumn()+1, |
| 336 | ))) |
| 337 | } |
| 338 | |
| 339 | return false |
| 340 | } |
| 341 | |
| 342 | // CSI A |
| 343 | // Cursor Up Ps Times (default = 1) (CUU) |
no test coverage detected