summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/term/mod.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-07-10 20:11:28 +0300
committerGitHub <noreply@github.com>2022-07-10 20:11:28 +0300
commit694a52bcffeffdc9e163818c3b2ac5c39e26f1ef (patch)
treea774babc1869b4c700d7df1478dbbfe5b2c3bcda /alacritty_terminal/src/term/mod.rs
parent8451b75689b44f11ec1707af7e26d915772c3972 (diff)
downloadalacritty-694a52bcffeffdc9e163818c3b2ac5c39e26f1ef.tar.gz
alacritty-694a52bcffeffdc9e163818c3b2ac5c39e26f1ef.zip
Add support for hyperlink escape sequence
This commit adds support for hyperlink escape sequence `OSC 8 ; params ; URI ST`. The configuration option responsible for those is `hints.enabled.hyperlinks`. Fixes #922.
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r--alacritty_terminal/src/term/mod.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index d600cc78..1f3269c2 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -16,7 +16,7 @@ use crate::event::{Event, EventListener};
use crate::grid::{Dimensions, Grid, GridIterator, Scroll};
use crate::index::{self, Boundary, Column, Direction, Line, Point, Side};
use crate::selection::{Selection, SelectionRange, SelectionType};
-use crate::term::cell::{Cell, Flags, LineLength};
+use crate::term::cell::{Cell, Flags, Hyperlink, LineLength};
use crate::term::color::{Colors, Rgb};
use crate::vi_mode::{ViModeCursor, ViMotion};
@@ -1679,6 +1679,12 @@ impl<T: EventListener> Handler for Term<T> {
}
}
+ #[inline]
+ fn set_hyperlink(&mut self, hyperlink: Option<Hyperlink>) {
+ trace!("Setting hyperlink: {:?}", hyperlink);
+ self.grid.cursor.template.set_hyperlink(hyperlink);
+ }
+
/// Set a terminal attribute.
#[inline]
fn terminal_attribute(&mut self, attr: Attr) {