From 6ba69f8dd469e1a9aff0b48b3ae10ce4510ca1e3 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Tue, 15 Oct 2024 14:06:59 +0000 Subject: Add IME support to inline search This changes the behavior of inline search from only accepting direct key inputs, to also accepting IME and paste. The additional characters are still being discarded, matching the existing behavior. This also fixes an issue where inline search wouldn't work for characters requiring modifiers, since the modifier press was interpreted as the search target instead. Closes #8208. --- alacritty/src/display/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'alacritty/src/display/mod.rs') diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs index a8501da6..d0044f8b 100644 --- a/alacritty/src/display/mod.rs +++ b/alacritty/src/display/mod.rs @@ -884,8 +884,11 @@ impl Display { }, None => { let num_lines = self.size_info.screen_lines(); - term::point_to_viewport(display_offset, cursor_point) - .filter(|point| point.line < num_lines) + match vi_cursor_viewport_point { + None => term::point_to_viewport(display_offset, cursor_point) + .filter(|point| point.line < num_lines), + point => point, + } }, }; -- cgit