From 3fcc173c8ef4b1d8a51f385175c0af2e162a0218 Mon Sep 17 00:00:00 2001 From: rhysd Date: Fri, 14 Feb 2025 18:02:46 +0900 Subject: Fix updating spans cache for pre-edit content in window manager --- winit/src/program/window_manager.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/winit/src/program/window_manager.rs b/winit/src/program/window_manager.rs index 27306439..139d787a 100644 --- a/winit/src/program/window_manager.rs +++ b/winit/src/program/window_manager.rs @@ -343,6 +343,10 @@ where shaping: text::Shaping::Advanced, wrapping: text::Wrapping::None, }); + + self.spans.clear(); + self.spans + .extend(spans.into_iter().map(text::Span::to_static)); } } -- cgit