Skip to content

Inline app output after exit is garbled for Input widget #6064

@robvanderleek

Description

@robvanderleek

For an inline app that I'm building I want to keep the content on screen after exiting, so I'm using inline_no_clear=True.

For the Input widget this flag garbles the terminal output.
For example, the program below:

from textual.app import App, ComposeResult
from textual.widgets import Button, Input


class ExampleApp(App):
    def compose(self) -> ComposeResult:
        yield Input("Press ctrl+q to quit")


if __name__ == "__main__":
    app = ExampleApp()
    app.run(inline=True, inline_no_clear=True)

produces:

Image

after pressing ctrl+q

Textual Diagnostics

Versions

Name Value
Textual 5.3.0
Rich 14.1.0

Python

Name Value
Version 3.13.7
Implementation CPython
Compiler Clang 17.0.0 (clang-1700.0.13.3)
Executable /Users/rob/projects/robvanderleek/inquirer-textual/.venv/bin/python3

Operating System

Name Value
System Darwin
Release 24.6.0
Version Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000

Terminal

Name Value
Terminal Application iTerm.app (3.5.14)
TERM xterm-256color
COLORTERM truecolor
FORCE_COLOR Not set
NO_COLOR Not set

Rich Console options

Name Value
size width=80, height=25
legacy_windows False
min_width 1
max_width 80
is_terminal False
encoding utf-8
max_height 25
justify None
overflow None
no_wrap False
highlight None
markup None
height None

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