@@ -13,10 +13,10 @@ Why it is needed:
1313 poorly in terminals commonly used on Solaris systems
1414
1515diff --git a/codex-rs/tui/src/app/resize_reflow.rs b/codex-rs/tui/src/app/resize_reflow.rs
16- index 6ef1721..8f6eeff 100644
16+ index 34e2569..10a3920 100644
1717--- a/codex-rs/tui/src/app/resize_reflow.rs
1818+++ b/codex-rs/tui/src/app/resize_reflow.rs
19- @@ -106 ,7 +106 ,8 @@ impl App {
19+ @@ -110 ,7 +110 ,8 @@ impl App {
2020 }
2121
2222 pub(super) fn terminal_resize_reflow_enabled(&self) -> bool {
@@ -27,7 +27,7 @@ index 6ef1721..8f6eeff 100644
2727
2828 /// Start retaining initial resume replay rows before they are written to scrollback.
2929diff --git a/codex-rs/tui/src/bottom_pane/chat_composer.rs b/codex-rs/tui/src/bottom_pane/chat_composer.rs
30- index e62cab9..62fc961 100644
30+ index ec32848..37b7020 100644
3131--- a/codex-rs/tui/src/bottom_pane/chat_composer.rs
3232+++ b/codex-rs/tui/src/bottom_pane/chat_composer.rs
3333@@ -206,6 +206,7 @@ use crate::render::RectExt;
@@ -38,7 +38,7 @@ index e62cab9..62fc961 100644
3838 use codex_protocol::ThreadId;
3939 use codex_protocol::user_input::ByteRange;
4040 use codex_protocol::user_input::MAX_USER_INPUT_TEXT_CHARS;
41- @@ -4264 ,9 +4265 ,13 @@ impl ChatComposer {
41+ @@ -4390 ,9 +4391 ,13 @@ impl ChatComposer {
4242 let prompt = if self.draft.input_enabled {
4343 if self.draft.is_bash_mode {
4444 Span::from("!").light_red().bold()
@@ -115,7 +115,7 @@ index ffb2a28..9bb58ac 100644
115115 let style = if use_theme_colors {
116116 let accent = StatusLineAccent::for_item(item);
117117diff --git a/codex-rs/tui/src/custom_terminal.rs b/codex-rs/tui/src/custom_terminal.rs
118- index 995a035..0336b9d 100644
118+ index 995a035..eebc492 100644
119119--- a/codex-rs/tui/src/custom_terminal.rs
120120+++ b/codex-rs/tui/src/custom_terminal.rs
121121@@ -195,6 +195,12 @@ where
@@ -156,7 +156,7 @@ index b1a3a52..fbd2174 100644
156156 command_display: Option<String>,
157157 stdin: String,
158158diff --git a/codex-rs/tui/src/history_cell/messages.rs b/codex-rs/tui/src/history_cell/messages.rs
159- index 19a6ec2..09b91e9 100644
159+ index ed899f3..3b7f496 100644
160160--- a/codex-rs/tui/src/history_cell/messages.rs
161161+++ b/codex-rs/tui/src/history_cell/messages.rs
162162@@ -167,7 +167,7 @@ impl HistoryCell for UserHistoryCell {
@@ -180,13 +180,13 @@ index 19a6ec2..09b91e9 100644
180180 pub(crate) struct ReasoningSummaryCell {
181181 _header: String,
182182diff --git a/codex-rs/tui/src/history_cell/mod.rs b/codex-rs/tui/src/history_cell/mod.rs
183- index 12788a5..e833c1d 100644
183+ index 9cef3e4..7336453 100644
184184--- a/codex-rs/tui/src/history_cell/mod.rs
185185+++ b/codex-rs/tui/src/history_cell/mod.rs
186- @@ -33 ,6 +33 ,7 @@ use crate::render::renderable::Renderable ;
187- use crate::session_state::ThreadSessionState ;
188- use crate::style::proposed_plan_style ;
189- use crate::style::user_message_style ;
186+ @@ -37 ,6 +37 ,7 @@ use crate::terminal_hyperlinks::mark_buffer_hyperlinks ;
187+ use crate::terminal_hyperlinks::plain_hyperlink_lines ;
188+ use crate::terminal_hyperlinks::prefix_hyperlink_lines ;
189+ use crate::terminal_hyperlinks::visible_lines ;
190190+ use crate::terminal_palette::use_ascii_ui;
191191 #[cfg(test)]
192192 use crate::test_support::PathBufExt;
@@ -248,10 +248,10 @@ index 23e8836..b65e0d5 100644
248248 out
249249 }
250250diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs
251- index 34065b7..e66a71f 100644
251+ index 508977f..fe5cdfa 100644
252252--- a/codex-rs/tui/src/lib.rs
253253+++ b/codex-rs/tui/src/lib.rs
254- @@ -1317 ,7 +1317 ,16 @@ async fn run_ratatui_app(
254+ @@ -1324 ,7 +1324 ,16 @@ async fn run_ratatui_app(
255255 prev_hook(info);
256256 }));
257257 let mut initialized_terminal = tui::init()?;
@@ -370,7 +370,7 @@ index 53c68d9..331b83d 100644
370370 mod imp {
371371 use super::DefaultColors;
372372diff --git a/codex-rs/tui/src/tui.rs b/codex-rs/tui/src/tui.rs
373- index ef2f1b0..6d6e40c 100644
373+ index b9055f5..0075a4c 100644
374374--- a/codex-rs/tui/src/tui.rs
375375+++ b/codex-rs/tui/src/tui.rs
376376@@ -16,9 +16,13 @@ use std::time::Duration;
@@ -397,7 +397,7 @@ index ef2f1b0..6d6e40c 100644
397397 use tokio::sync::broadcast;
398398 use tokio_stream::Stream;
399399
400- @@ -171 ,18 +177 ,23 @@ mod tests {
400+ @@ -173 ,18 +179 ,23 @@ mod tests {
401401 pub fn set_modes() -> Result<()> {
402402 ensure_virtual_terminal_processing()?;
403403
@@ -432,7 +432,7 @@ index ef2f1b0..6d6e40c 100644
432432 Ok(())
433433 }
434434
435- @@ -246 ,14 +257 ,20 @@ fn restore_common(
435+ @@ -248 ,14 +259 ,20 @@ fn restore_common(
436436 ) -> Result<()> {
437437 let mut first_error = ensure_virtual_terminal_processing().err();
438438
@@ -453,7 +453,7 @@ index ef2f1b0..6d6e40c 100644
453453 let _ = execute!(stdout(), DisableFocusChange);
454454 if matches!(raw_mode_restore, RawModeRestore::Disable)
455455 && let Err(err) = disable_raw_mode()
456- @@ -373 ,7 +390 ,7 @@ pub(crate) fn init() -> Result<InitializedTerminal> {
456+ @@ -375 ,7 +392 ,7 @@ pub(crate) fn init() -> Result<InitializedTerminal> {
457457 #[cfg(unix)]
458458 let backend = CrosstermBackend::new(stdout());
459459
@@ -462,7 +462,7 @@ index ef2f1b0..6d6e40c 100644
462462 let startup_probe = {
463463 use crate::terminal_probe::StartupKeyboardEnhancementProbe;
464464
465- @@ -409 ,6 +426 ,13 @@ pub(crate) fn init() -> Result<InitializedTerminal> {
465+ @@ -411 ,6 +428 ,13 @@ pub(crate) fn init() -> Result<InitializedTerminal> {
466466 }
467467 };
468468
@@ -476,7 +476,7 @@ index ef2f1b0..6d6e40c 100644
476476 #[cfg(unix)]
477477 crate::terminal_palette::set_default_colors_from_startup_probe(startup_probe.default_colors);
478478
479- @@ -514 ,6 +538 ,14 @@ struct PendingHistoryLines {
479+ @@ -516 ,6 +540 ,14 @@ struct PendingHistoryLines {
480480 wrap_policy: HistoryLineWrapPolicy,
481481 }
482482
@@ -491,7 +491,7 @@ index ef2f1b0..6d6e40c 100644
491491 fn clear_for_viewport_change<B>(terminal: &mut CustomTerminal<B>, new_area: Rect) -> Result<()>
492492 where
493493 B: Backend + Write,
494- @@ -557 ,14 +589 ,14 @@ impl Tui {
494+ @@ -559 ,14 +591 ,14 @@ impl Tui {
495495 notification_backend: Some(detect_backend(NotificationMethod::default())),
496496 notification_condition: NotificationCondition::default(),
497497 is_zellij,
@@ -508,7 +508,7 @@ index ef2f1b0..6d6e40c 100644
508508 }
509509
510510 pub fn set_notification_settings(
511- @@ -839,46 +871,49 @@ impl Tui {
511+ @@ -852,18 +884,21 @@ impl Tui {
512512
513513 // Precompute any viewport updates that need a cursor-position query before entering
514514 // the synchronized update, to avoid racing with the event reader.
@@ -532,35 +532,7 @@ index ef2f1b0..6d6e40c 100644
532532 terminal.set_viewport_area(new_area);
533533 terminal.clear()?;
534534 }
535-
536- let size = terminal.size()?;
537-
538- let mut area = terminal.viewport_area;
539- area.height = height.min(size.height);
540- area.width = size.width;
541- // If the viewport has expanded, scroll everything else up to make room.
542- if area.bottom() > size.height {
543- terminal
544- .backend_mut()
545- .scroll_region_up(0..area.top(), area.bottom() - size.height)?;
546- area.y = size.height - area.height;
547- }
548- if area != terminal.viewport_area {
549- // On startup, the old viewport can still be empty. Clear from the
550- // new viewport top so stale shell cells do not show through spaces.
551- clear_for_viewport_change(terminal, area)?;
552- terminal.set_viewport_area(area);
553- }
554-
555- Self::flush_pending_history_lines(
556- terminal,
557- &mut self.pending_history_lines,
558- self.is_zellij,
559- )?;
560-
561- // Update the y position for suspending so Ctrl-Z can place the cursor correctly.
562- #[cfg(unix)]
563- @@ -897,7 +932,13 @@ impl Tui {
535+ @@ -910,7 +945,13 @@ impl Tui {
564536 terminal.draw(|frame| {
565537 draw_fn(frame);
566538 })
@@ -575,7 +547,7 @@ index ef2f1b0..6d6e40c 100644
575547 }
576548
577549 pub fn draw_ambient_pet_image(
578- @@ -1009 ,12 +1050 ,18 @@ impl Tui {
550+ @@ -1022 ,12 +1063 ,18 @@ impl Tui {
579551 }
580552
581553 terminal.draw(|frame| {
0 commit comments