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

Method update_screen_lines

rich/console.py:1853–1871  ·  view source on GitHub ↗

Update lines of the screen at a given offset. Args: lines (List[List[Segment]]): Rendered lines (as produced by :meth:`~rich.Console.render_lines`). x (int, optional): x offset (column no). Defaults to 0. y (int, optional): y offset (column no). Defaults

(
        self, lines: List[List[Segment]], x: int = 0, y: int = 0
    )

Source from the content-addressed store, hash-verified

1851 self.update_screen_lines(lines, x, y)
1852
1853 def update_screen_lines(
1854 self, lines: List[List[Segment]], x: int = 0, y: int = 0
1855 ) -> None:
1856 """Update lines of the screen at a given offset.
1857
1858 Args:
1859 lines (List[List[Segment]]): Rendered lines (as produced by :meth:`~rich.Console.render_lines`).
1860 x (int, optional): x offset (column no). Defaults to 0.
1861 y (int, optional): y offset (column no). Defaults to 0.
1862
1863 Raises:
1864 errors.NoAltScreen: If the Console isn't in alt screen mode.
1865 """
1866 if not self.is_alt_screen:
1867 raise errors.NoAltScreen("Alt screen must be enabled to call update_screen")
1868 screen_update = ScreenUpdate(lines, x, y)
1869 segments = self.render(screen_update)
1870 self._buffer.extend(segments)
1871 self._check_buffer()
1872
1873 def print_exception(
1874 self,

Callers 3

test_update_screen_linesFunction · 0.95
update_screenMethod · 0.95
refresh_screenMethod · 0.80

Calls 4

renderMethod · 0.95
_check_bufferMethod · 0.95
ScreenUpdateClass · 0.85
extendMethod · 0.45

Tested by 1

test_update_screen_linesFunction · 0.76