aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/renderer
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2024-11-02 20:05:51 +0000
committerGitHub <noreply@github.com>2024-11-02 20:05:51 +0000
commitfd745a9f4cb3ba81623167c9d1117747353db33a (patch)
treeeffc8817d4d024dd80477fce123bcd2335b95874 /alacritty/src/renderer
parent39ea7271e32ad88280191d8040d6f8feafe4307a (diff)
downloadr-alacritty-fd745a9f4cb3ba81623167c9d1117747353db33a.tar.gz
r-alacritty-fd745a9f4cb3ba81623167c9d1117747353db33a.tar.bz2
r-alacritty-fd745a9f4cb3ba81623167c9d1117747353db33a.zip
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.
Diffstat (limited to 'alacritty/src/renderer')
-rw-r--r--alacritty/src/renderer/text/gles2.rs6
-rw-r--r--alacritty/src/renderer/text/glsl3.rs6
-rw-r--r--alacritty/src/renderer/text/mod.rs2
3 files changed, 7 insertions, 7 deletions
diff --git a/alacritty/src/renderer/text/gles2.rs b/alacritty/src/renderer/text/gles2.rs
index 427a60e3..8756ea80 100644
--- a/alacritty/src/renderer/text/gles2.rs
+++ b/alacritty/src/renderer/text/gles2.rs
@@ -346,7 +346,7 @@ pub struct RenderApi<'a> {
dual_source_blending: bool,
}
-impl<'a> Drop for RenderApi<'a> {
+impl Drop for RenderApi<'_> {
fn drop(&mut self) {
if !self.batch.is_empty() {
self.render_batch();
@@ -354,7 +354,7 @@ impl<'a> Drop for RenderApi<'a> {
}
}
-impl<'a> LoadGlyph for RenderApi<'a> {
+impl LoadGlyph for RenderApi<'_> {
fn load_glyph(&mut self, rasterized: &RasterizedGlyph) -> Glyph {
Atlas::load_glyph(self.active_tex, self.atlas, self.current_atlas, rasterized)
}
@@ -364,7 +364,7 @@ impl<'a> LoadGlyph for RenderApi<'a> {
}
}
-impl<'a> TextRenderApi<Batch> for RenderApi<'a> {
+impl TextRenderApi<Batch> for RenderApi<'_> {
fn batch(&mut self) -> &mut Batch {
self.batch
}
diff --git a/alacritty/src/renderer/text/glsl3.rs b/alacritty/src/renderer/text/glsl3.rs
index 7c32bf9f..fee95ce3 100644
--- a/alacritty/src/renderer/text/glsl3.rs
+++ b/alacritty/src/renderer/text/glsl3.rs
@@ -215,7 +215,7 @@ pub struct RenderApi<'a> {
program: &'a mut TextShaderProgram,
}
-impl<'a> TextRenderApi<Batch> for RenderApi<'a> {
+impl TextRenderApi<Batch> for RenderApi<'_> {
fn batch(&mut self) -> &mut Batch {
self.batch
}
@@ -261,7 +261,7 @@ impl<'a> TextRenderApi<Batch> for RenderApi<'a> {
}
}
-impl<'a> LoadGlyph for RenderApi<'a> {
+impl LoadGlyph for RenderApi<'_> {
fn load_glyph(&mut self, rasterized: &RasterizedGlyph) -> Glyph {
Atlas::load_glyph(self.active_tex, self.atlas, self.current_atlas, rasterized)
}
@@ -271,7 +271,7 @@ impl<'a> LoadGlyph for RenderApi<'a> {
}
}
-impl<'a> Drop for RenderApi<'a> {
+impl Drop for RenderApi<'_> {
fn drop(&mut self) {
if !self.batch.is_empty() {
self.render_batch();
diff --git a/alacritty/src/renderer/text/mod.rs b/alacritty/src/renderer/text/mod.rs
index 886b7f8b..acd1b521 100644
--- a/alacritty/src/renderer/text/mod.rs
+++ b/alacritty/src/renderer/text/mod.rs
@@ -186,7 +186,7 @@ pub struct LoaderApi<'a> {
current_atlas: &'a mut usize,
}
-impl<'a> LoadGlyph for LoaderApi<'a> {
+impl LoadGlyph for LoaderApi<'_> {
fn load_glyph(&mut self, rasterized: &RasterizedGlyph) -> Glyph {
Atlas::load_glyph(self.active_tex, self.atlas, self.current_atlas, rasterized)
}