diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-04-13 03:24:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 03:24:42 +0000 |
commit | 96fc9ecc9a62c8a766da745d05fbe60e6c2e1efe (patch) | |
tree | 16e237d750d6c650713b58df98453dc4df16d33a /alacritty/src/config/mouse.rs | |
parent | 40bcdb11335cc49d4d42694b953be746cb383cb9 (diff) | |
download | r-alacritty-96fc9ecc9a62c8a766da745d05fbe60e6c2e1efe.tar.gz r-alacritty-96fc9ecc9a62c8a766da745d05fbe60e6c2e1efe.tar.bz2 r-alacritty-96fc9ecc9a62c8a766da745d05fbe60e6c2e1efe.zip |
Add vi/mouse hint highlighting support
This patch removes the old url highlighting code and replaces it with a
new implementation making use of hints as sources for finding matches in
the terminal.
Diffstat (limited to 'alacritty/src/config/mouse.rs')
-rw-r--r-- | alacritty/src/config/mouse.rs | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/alacritty/src/config/mouse.rs b/alacritty/src/config/mouse.rs index 2aa7557c..aed1ab04 100644 --- a/alacritty/src/config/mouse.rs +++ b/alacritty/src/config/mouse.rs @@ -1,50 +1,12 @@ use std::time::Duration; -use glutin::event::ModifiersState; - use alacritty_config_derive::ConfigDeserialize; -use alacritty_terminal::config::Program; - -use crate::config::bindings::ModsWrapper; #[derive(ConfigDeserialize, Default, Clone, Debug, PartialEq, Eq)] pub struct Mouse { pub double_click: ClickHandler, pub triple_click: ClickHandler, pub hide_when_typing: bool, - pub url: Url, -} - -#[derive(ConfigDeserialize, Clone, Debug, PartialEq, Eq)] -pub struct Url { - /// Program for opening links. - pub launcher: Option<Program>, - - /// Modifier used to open links. - modifiers: ModsWrapper, -} - -impl Url { - pub fn mods(&self) -> ModifiersState { - self.modifiers.into_inner() - } -} - -impl Default for Url { - fn default() -> Url { - Url { - #[cfg(not(any(target_os = "macos", windows)))] - launcher: Some(Program::Just(String::from("xdg-open"))), - #[cfg(target_os = "macos")] - launcher: Some(Program::Just(String::from("open"))), - #[cfg(windows)] - launcher: Some(Program::WithArgs { - program: String::from("cmd"), - args: vec!["/c".to_string(), "start".to_string(), "".to_string()], - }), - modifiers: Default::default(), - } - } } #[derive(ConfigDeserialize, Clone, Debug, PartialEq, Eq)] |