repl: redraw prompt after asynchronous console output - #65214
Open
inoway46 wants to merge 1 commit into
Open
Conversation
inoway46
marked this pull request as ready for review
August 11, 2026 12:09
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #65214 +/- ##
========================================
Coverage 90.31% 90.32%
========================================
Files 760 760
Lines 248532 248672 +140
Branches 46908 46941 +33
========================================
+ Hits 224467 224603 +136
+ Misses 15505 15477 -28
- Partials 8560 8592 +32
🚀 New features to boost your workflow:
|
inoway46
force-pushed
the
fix-repl-async-console-rejection-redraw
branch
3 times, most recently
from
August 12, 2026 04:33
4978e29 to
8d08fd2
Compare
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
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: #43074
Asynchronous console output can be written while the REPL is waiting for input, leaving readline's rendered prompt out of sync with its internal line and cursor state.
Register an internal post-write callback for REPL console instances and redraw the prompt after asynchronous output. This matches the output-then-redraw ordering used for REPL-managed asynchronous errors while preserving the current input and cursor position. It applies to both the default global console and isolated REPL contexts.
Add regression coverage for synchronous output, timer-driven asynchronous output, and cursor preservation in both contexts.
Manual verification
aaaa)