Open URLs with cmd-click (#7312)
Release Notes: - Added ability to cmd-click on URLs in all buffers --------- Co-authored-by: fdionisi <code@fdionisi.me>
This commit is contained in:
parent
583273b6ee
commit
1a82470897
13 changed files with 551 additions and 601 deletions
|
@ -25,6 +25,7 @@ pub(crate) struct TestPlatform {
|
|||
active_cursor: Mutex<CursorStyle>,
|
||||
current_clipboard_item: Mutex<Option<ClipboardItem>>,
|
||||
pub(crate) prompts: RefCell<TestPrompts>,
|
||||
pub opened_url: RefCell<Option<String>>,
|
||||
weak: Weak<Self>,
|
||||
}
|
||||
|
||||
|
@ -45,6 +46,7 @@ impl TestPlatform {
|
|||
active_window: Default::default(),
|
||||
current_clipboard_item: Mutex::new(None),
|
||||
weak: weak.clone(),
|
||||
opened_url: Default::default(),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -188,8 +190,8 @@ impl Platform for TestPlatform {
|
|||
|
||||
fn stop_display_link(&self, _display_id: DisplayId) {}
|
||||
|
||||
fn open_url(&self, _url: &str) {
|
||||
unimplemented!()
|
||||
fn open_url(&self, url: &str) {
|
||||
*self.opened_url.borrow_mut() = Some(url.to_string())
|
||||
}
|
||||
|
||||
fn on_open_urls(&self, _callback: Box<dyn FnMut(Vec<String>)>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue