aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/renderer/text/glsl3.rs
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/text/glsl3.rs
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/text/glsl3.rs')
-rw-r--r--alacritty/src/renderer/text/glsl3.rs6
1 files changed, 3 insertions, 3 deletions
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();