From 9f81f39f510d4f77a7417214e891f9f0489d88cb Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Mon, 19 Sep 2022 09:07:41 -0700 Subject: [PATCH] WIP Hyperlinks --- crates/terminal/src/terminal.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index 46fcb40311..9da2831740 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -43,7 +43,7 @@ use std::{ collections::{HashMap, VecDeque}, fmt::Display, io, - ops::{Deref, RangeInclusive, Sub}, + ops::{Deref, Range, RangeInclusive, Sub}, os::unix::{prelude::AsRawFd, process::CommandExt}, path::PathBuf, process::Command, @@ -493,7 +493,7 @@ pub struct Terminal { pub matches: Vec>, last_content: TerminalContent, last_synced: Instant, - last_hovered_hyperlink: Option, + last_hovered_hyperlink: Option<(Hyperlink, Range)>, sync_task: Option>, selection_head: Option, breadcrumb_text: String, @@ -832,7 +832,7 @@ impl Terminal { } } } else if e.cmd { - self.last_hovered_hyperlink = cell_for_mouse(e.position, &self.last_content) + let hyperlink = cell_for_mouse(e.position, &self.last_content) .cell .hyperlink(); }