Avoid redundant renderer resets during application lifecycle - #2079
Open
deepakganesh78 wants to merge 2 commits into
Open
Avoid redundant renderer resets during application lifecycle#2079deepakganesh78 wants to merge 2 commits into
deepakganesh78 wants to merge 2 commits into
Conversation
Track whether the renderer has produced terminal state so application resets only clean up when needed. Add a lifecycle regression test covering startup and shutdown reset counts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep renderer cleanup pending when a resize reset intentionally retains the alternate screen. Cover a failed full-screen redraw after resize to ensure final cleanup quits the alternate screen. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Author
|
Addressed the resize/alternate-screen lifecycle review in e2c21a7.
Validation:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1967.
Summary
Applicationinitialization and first startup, when nothing has rendered yetValidation
uv run pytest -q tests/test_application.py tests/test_vt100_output.py— 4 passeduv run prek run --files src/prompt_toolkit/application/application.py src/prompt_toolkit/renderer.py tests/test_application.py— passeduv run pytest -q tests/— 148 passed, 5 skipped; 4 Windows/non-console failures reproduced unchanged onmain(two history-input timing assertions and twoNoConsoleScreenBufferErrorfailures)application.py:1119,:1123, and:1126main