From b3f0f68184b0d6b6221a5955acfcc4e33c01b766 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Fri, 5 Jul 2024 12:12:15 +0200 Subject: Fix search bug with wrapline on first character This fixes an issue where an inline search in the left direction would incorrectly assume that the first cell searched would not contain the `WRAPLINE` flag, causing the second search for the match end to terminate prematurely. Fixes #8060. --- alacritty/src/renderer/text/glyph_cache.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'alacritty/src') diff --git a/alacritty/src/renderer/text/glyph_cache.rs b/alacritty/src/renderer/text/glyph_cache.rs index 957cde1a..6acc3189 100644 --- a/alacritty/src/renderer/text/glyph_cache.rs +++ b/alacritty/src/renderer/text/glyph_cache.rs @@ -187,14 +187,9 @@ impl GlyphCache { /// /// This will fail when the glyph could not be rasterized. Usually this is due to the glyph /// not being present in any font. - pub fn get( - &mut self, - glyph_key: GlyphKey, - loader: &mut L, - show_missing: bool, - ) -> Glyph + pub fn get(&mut self, glyph_key: GlyphKey, loader: &mut L, show_missing: bool) -> Glyph where - L: LoadGlyph, + L: LoadGlyph + ?Sized, { // Try to load glyph from cache. if let Some(glyph) = self.cache.get(&glyph_key) { @@ -242,9 +237,9 @@ impl GlyphCache { /// Load glyph into the atlas. /// /// This will apply all transforms defined for the glyph cache to the rasterized glyph before - pub fn load_glyph(&self, loader: &mut L, mut glyph: RasterizedGlyph) -> Glyph + pub fn load_glyph(&self, loader: &mut L, mut glyph: RasterizedGlyph) -> Glyph where - L: LoadGlyph, + L: LoadGlyph + ?Sized, { glyph.left += i32::from(self.glyph_offset.x); glyph.top += i32::from(self.glyph_offset.y); -- cgit