From fd745a9f4cb3ba81623167c9d1117747353db33a Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sat, 2 Nov 2024 20:05:51 +0000 Subject: Fix racing condition in hint triggering This fixes an issue with hints where it was possible that the terminal content of highlighted hints changed between the highlighted hint update and the activation of the hint. This patch always validates the hint's text content against the hint itself to ensure that the content is still valid for the original hint which triggered the highlight. Closes #8277. --- alacritty_terminal/src/grid/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alacritty_terminal/src/grid/mod.rs') diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs index 278bea3b..fbd2c79e 100644 --- a/alacritty_terminal/src/grid/mod.rs +++ b/alacritty_terminal/src/grid/mod.rs @@ -615,7 +615,7 @@ pub trait BidirectionalIterator: Iterator { fn prev(&mut self) -> Option; } -impl<'a, T> BidirectionalIterator for GridIterator<'a, T> { +impl BidirectionalIterator for GridIterator<'_, T> { fn prev(&mut self) -> Option { let topmost_line = self.grid.topmost_line(); let last_column = self.grid.last_column(); -- cgit