mirror of
https://github.com/openai/codex.git
synced 2026-11-29 00:00:54 +00:00
Render flushed TUI input in the same frame (#63233)
## Why The TUI skipped the frame that flushed buffered input, so pasted text and pending Vim replacement keys only appeared on a follow-up redraw. ## What changed Refresh startup recovery after a flush and render in the current frame once all editors have finished buffering. If an editor is still buffering, defer rendering and schedule another tick. ## Testing Update the multiline paste test to require the text to appear on the first draw after the paste timeout. Update the startup recovery test to check that committing a pending Vim replacement key allows that frame to render. GitOrigin-RevId: 8c92f075aa2c9ada3b60ecdf83b1f677ffd52f1a
This commit is contained in:
committed by
copyberry
parent
ae6c0c8ac1
commit
1b0b42bfca
@@ -886,8 +886,7 @@ async fn raw_multiline_paste_defers_rendering_and_submits_once() -> Result<()> {
|
||||
let during_paste = screen(&tui);
|
||||
// Wait out Windows' active-paste timeout and accidental-Enter suppression window.
|
||||
tokio::time::advance(Duration::from_secs(/*secs*/ 1)).await;
|
||||
app.handle_tui_event(&mut tui, &mut server, TuiEvent::Draw)
|
||||
.await?;
|
||||
// The draw that flushes the paste should also display it.
|
||||
app.handle_tui_event(&mut tui, &mut server, TuiEvent::Draw)
|
||||
.await?;
|
||||
assert!(screen(&tui).contains("After paste"));
|
||||
|
||||
Reference in New Issue
Block a user