Skip to main content

par_term_terminal/terminal/
hyperlinks.rs

1use super::TerminalManager;
2pub use par_term_emu_core_rust::terminal::HyperlinkInfo;
3
4impl TerminalManager {
5    /// Get all OSC 8 hyperlinks from the terminal
6    pub fn get_all_hyperlinks(&self) -> Vec<HyperlinkInfo> {
7        let pty = self.pty_session.lock();
8        let terminal = pty.terminal();
9        let term = terminal.lock();
10        term.get_all_hyperlinks()
11    }
12
13    /// Get the URL for a specific hyperlink ID
14    #[allow(dead_code)]
15    pub fn get_hyperlink_url(&self, hyperlink_id: u32) -> Option<String> {
16        let pty = self.pty_session.lock();
17        let terminal = pty.terminal();
18        let term = terminal.lock();
19        term.get_hyperlink_url(hyperlink_id)
20    }
21}