MCPcopy
hub / github.com/Textualize/textual / resize_terminal

Method resize_terminal

src/textual/pilot.py:86–98  ·  view source on GitHub ↗

Resize the terminal to the given dimensions. Args: width: The new width of the terminal. height: The new height of the terminal.

(self, width: int, height: int)

Source from the content-addressed store, hash-verified

84 await self._wait_for_screen()
85
86 async def resize_terminal(self, width: int, height: int) -> None:
87 """Resize the terminal to the given dimensions.
88
89 Args:
90 width: The new width of the terminal.
91 height: The new height of the terminal.
92 """
93 size = Size(width, height)
94 # If we're running with the headless driver, update the inherent app size.
95 if isinstance(self.app._driver, HeadlessDriver):
96 self.app._driver._size = size
97 self.app.post_message(Resize(size, size))
98 await self.pause()
99
100 async def mouse_down(
101 self,

Callers 2

run_beforeFunction · 0.80

Calls 4

pauseMethod · 0.95
SizeClass · 0.90
ResizeClass · 0.90
post_messageMethod · 0.45

Tested by 2

run_beforeFunction · 0.64