diff options
author | Christian Duerr <contact@christianduerr.com> | 2024-07-05 12:12:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-05 13:12:15 +0300 |
commit | b3f0f68184b0d6b6221a5955acfcc4e33c01b766 (patch) | |
tree | 3ea002e3f37f68f4b217657b1871ae3bd2fce79b /alacritty/src | |
parent | 5e6b92db85b3ea7ffd06a7a5ae0d2d62ad5946a6 (diff) | |
download | r-alacritty-b3f0f68184b0d6b6221a5955acfcc4e33c01b766.tar.gz r-alacritty-b3f0f68184b0d6b6221a5955acfcc4e33c01b766.tar.bz2 r-alacritty-b3f0f68184b0d6b6221a5955acfcc4e33c01b766.zip |
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.
Diffstat (limited to 'alacritty/src')
-rw-r--r-- | alacritty/src/renderer/text/glyph_cache.rs | 13 |
1 files changed, 4 insertions, 9 deletions
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<L: ?Sized>( - &mut self, - glyph_key: GlyphKey, - loader: &mut L, - show_missing: bool, - ) -> Glyph + pub fn get<L>(&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<L: ?Sized>(&self, loader: &mut L, mut glyph: RasterizedGlyph) -> Glyph + pub fn load_glyph<L>(&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); |