-
Notifications
You must be signed in to change notification settings - Fork 754
Open
Description
This results in some output escape sequences to be produced multiple times without reason, like showing the cursor.
Renderer.reset() is called three times when we create/start an application, like ptpython for instance:
- Once
Application.__init__()->Renderer.__init__()->Renderer.reset(). - Once
Application.__init__()->Application.reset()->Renderer.reset(). - Once
Application._run_async()->Application.__init__()->Application.reset()->Renderer.reset().
Each time, we call self.output.show_cursor().
Either we should keep track in the Renderer, which terminal state was changed, and only reset that (cursor shapes changed, cursor hidden/shown, alternate screen entered/left, ...) or we should create the Renderer instance only at the point that the application actually starts in Application._run_async(), so that we only reset once.
Metadata
Metadata
Assignees
Labels
No labels