-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
_pyrepl: switch console refresh to structured rendered screens #148105
Description
Bug report
The _pyrepl refresh path tangles screen generation, layout math, and terminal I/O together. Both Unix and Windows consoles independently reconstruct what changed from raw string lists, duplicating layout logic. Style metadata is discarded mid-pipeline, blocking richer theme support. A single dirty flag triggers full recomputation even when only an overlay or prompt changed. Completions are spliced into source content rather than layered on top, complicating cache invalidation. Prompt selection also breaks on wrapped lines because the cached rendered-row count is used where a logical line number is expected.
Additionally, because there is no line-level diffing, unchanged lines are fully redrawn every refresh cycle, causing visible flickering in terminals like Ghostty.