(
self, top: int, bottom: int, left: int | None = None, right: int | None = None
)
| 279 | self.move_cursor(0, y) |
| 280 | |
| 281 | def _scroll( |
| 282 | self, top: int, bottom: int, left: int | None = None, right: int | None = None |
| 283 | ) -> None: |
| 284 | scroll_rect = SMALL_RECT() |
| 285 | scroll_rect.Top = SHORT(top) |
| 286 | scroll_rect.Bottom = SHORT(bottom) |
| 287 | scroll_rect.Left = SHORT(0 if left is None else left) |
| 288 | scroll_rect.Right = SHORT( |
| 289 | self.getheightwidth()[1] - 1 if right is None else right |
| 290 | ) |
| 291 | destination_origin = _COORD() |
| 292 | fill_info = CHAR_INFO() |
| 293 | fill_info.UnicodeChar = " " |
| 294 | |
| 295 | if not ScrollConsoleScreenBuffer( |
| 296 | OutHandle, scroll_rect, None, destination_origin, fill_info |
| 297 | ): |
| 298 | raise WinError(get_last_error()) |
| 299 | |
| 300 | def _hide_cursor(self): |
| 301 | self.__write("\x1b[?25l") |
no test coverage detected