Skip to content

Display not being refreshed after App.suspend (since 0.85) #5528

Closed
@davep

Description

@davep

Using this code:

from os import system

from textual.app import App, ComposeResult
from textual.containers import Horizontal, Vertical
from textual.widgets import Footer, Header, Input


class SuspendingApp(App[None]):

    CSS = """
    Screen {
        Vertical {
            border: solid;
        }
    }
    """

    BINDINGS = [("f1", "edit")]

    def compose(self) -> ComposeResult:
        yield Header()
        with Horizontal():
            yield Vertical()
            yield Vertical()
        yield Input()
        yield Footer()

    def action_edit(self) -> None:
        with self.suspend():
            system("vim")


if __name__ == "__main__":
    SuspendingApp().run()

if you press f1 and then exit vim the screen of the Textual application doesn't fully restore:

Screen.Recording.2025-02-15.at.08.58.26.mov

Working backwards through Textual releases, the last version where App.suspend worked as intended was v0.84; it very much appears that v0.85.0 introduced this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions