From 88ef5b137fc4cc8e9b194ef5b8a888f10872ce84 Mon Sep 17 00:00:00 2001 From: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com> Date: Tue, 25 Nov 2025 22:45:54 -0500 Subject: [PATCH] terminal: Update search match highlights on resize (#43507) The fix for this is emitting a wake-up event to tell the terminal to recalculate its search highlights on resize. Release Notes: - terminal: Fix bug where search match highlights wouldn't update their position when resizing the terminal. --- crates/terminal/src/terminal.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index 69b6be5f249b811273aed8ecd96ed82493a3596a..48073aee51a376d3700a3f818081f87fd24c5ee1 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -992,6 +992,12 @@ impl Terminal { } term.resize(new_bounds); + // If there are matches we need to emit a wake up event to + // invalidate the matches and recalculate their locations + // in the new terminal layout + if !self.matches.is_empty() { + cx.emit(Event::Wakeup); + } } InternalEvent::Clear => { trace!("Clearing");