MCPcopy
hub / github.com/Textualize/rich / erase_start_of_line

Method erase_start_of_line

rich/_win32_console.py:484–491  ·  view source on GitHub ↗

Erase all content from the cursor position to the start of that line

(self)

Source from the content-addressed store, hash-verified

482 )
483
484 def erase_start_of_line(self) -> None:
485 """Erase all content from the cursor position to the start of that line"""
486 row, col = self.cursor_position
487 start = WindowsCoordinates(row, 0)
488 FillConsoleOutputCharacter(self._handle, " ", length=col, start=start)
489 FillConsoleOutputAttribute(
490 self._handle, self._default_attrs, length=col, start=start
491 )
492
493 def move_cursor_up(self) -> None:
494 """Move the cursor up a single cell"""

Callers 3

test_erase_start_of_lineFunction · 0.95
_win32_console.pyFile · 0.80
legacy_windows_renderFunction · 0.80

Calls 3

WindowsCoordinatesClass · 0.85

Tested by 1

test_erase_start_of_lineFunction · 0.76