Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/textual/drivers/linux_inline_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,14 @@ async def update_size() -> None:
)

def on_terminal_resize(signum, stack) -> None:
send_size_event(clear=True)
send_size_event(clear=False)

signal.signal(signal.SIGWINCH, on_terminal_resize)

self.write("\x1b[?25l") # Hide cursor
self.write("\033[?1004h") # Enable FocusIn/FocusOut.
self.write("\x1b[>1u") # https://sw.kovidgoyal.net/kitty/keyboard-protocol/
self.write("\x1b[?7l") # Disable auto-wrap
self.flush()

self._enable_mouse_support()
Expand Down Expand Up @@ -312,6 +313,7 @@ def stop_application_mode(self) -> None:
self.disable_input()
self.write("\x1b[<u") # Disable kitty protocol
self.write("\x1b[J")
self.write("\x1b[?7h") # Enable auto-wrap

if self.attrs_before is not None:
try:
Expand Down
4 changes: 2 additions & 2 deletions src/textual/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ def get_content_height(
Content height (in lines).
"""
if widget._nodes:
if not widget.styles.is_docked and all(
if not widget.styles.is_docked and any(
child.styles.is_dynamic_height for child in widget.displayed_children
):
# An exception for containers with all dynamic height widgets
# An exception for containers with dynamic height widgets
arrangement = widget.arrange(Size(width, container.height))
else:
arrangement = widget.arrange(Size(width, 0))
Expand Down