I would like for the output to remain visible after the executed command completes (right now once it completes the terminal contents are immediately cleared). I have worked out a hacky solution by re-routing Terminal.stop() to my own implementation (while invoking the original implementation) and copying display/screen contents and such - but that's just a bad workaround. It would be nice to have an option to keep showing the terminal contents until "something" happened: "something" could be a key press in the widget, an invocation of a "releasing" method or a pop-up, ...
Since there are many ways to approach and variations to implement the basic functionality, I would like to discuss first what would be the favorable way for this. I might just implement it than and create a PR.
Some context:
OS: Debian 12
Python: textual-terminal 0.3.0, pyte 0.8.2 and textual 0.59.0 (all straight from pip)
Application: I am using textual-terminal (primarily) as an log/output window for commands "triggered" elsewhere in my application. The terminal widget occupies only a portion of the screen.
I would like for the output to remain visible after the executed command completes (right now once it completes the terminal contents are immediately cleared). I have worked out a hacky solution by re-routing
Terminal.stop()
to my own implementation (while invoking the original implementation) and copying display/screen contents and such - but that's just a bad workaround. It would be nice to have an option to keep showing the terminal contents until "something" happened: "something" could be a key press in the widget, an invocation of a "releasing" method or a pop-up, ...Since there are many ways to approach and variations to implement the basic functionality, I would like to discuss first what would be the favorable way for this. I might just implement it than and create a PR.
Some context: