From 46c0f352c40ecb68653421cb178a297acaf00c6d Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 9 Jul 2020 21:45:22 +0000 Subject: Add regex scrollback buffer search This adds a new regex search which allows searching the entire scrollback and jumping between matches using the vi mode. All visible matches should be highlighted unless their lines are excessively long. This should help with performance since highlighting is done during render time. Fixes #1017. --- alacritty/src/window.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'alacritty/src/window.rs') diff --git a/alacritty/src/window.rs b/alacritty/src/window.rs index 4275f859..450329d4 100644 --- a/alacritty/src/window.rs +++ b/alacritty/src/window.rs @@ -35,7 +35,9 @@ use winapi::shared::minwindef::WORD; use alacritty_terminal::config::{Decorations, StartupMode, WindowConfig}; #[cfg(not(windows))] -use alacritty_terminal::term::{SizeInfo, Term}; +use alacritty_terminal::index::Point; +#[cfg(not(windows))] +use alacritty_terminal::term::SizeInfo; use crate::config::Config; use crate::gl; @@ -398,8 +400,7 @@ impl Window { /// Adjust the IME editor position according to the new location of the cursor. #[cfg(not(windows))] - pub fn update_ime_position(&mut self, terminal: &Term, size_info: &SizeInfo) { - let point = terminal.grid().cursor.point; + pub fn update_ime_position(&mut self, point: Point, size_info: &SizeInfo) { let SizeInfo { cell_width, cell_height, padding_x, padding_y, .. } = size_info; let nspot_x = f64::from(padding_x + point.col.0 as f32 * cell_width); -- cgit