diff --git a/src/localtab.rs b/src/localtab.rs index 05ad7cefd..f626ebc86 100644 --- a/src/localtab.rs +++ b/src/localtab.rs @@ -6,7 +6,6 @@ use portable_pty::{Child, MasterPty, PtySize}; use std::cell::{RefCell, RefMut}; use std::sync::Arc; use term::color::ColorPalette; -use term::selection::SelectionRange; use term::{Clipboard, KeyCode, KeyModifiers, MouseEvent, Terminal, TerminalHost}; pub struct LocalTab { @@ -91,19 +90,6 @@ impl Tab for LocalTab { self.domain_id } - fn selection_range(&self) -> Option { - let terminal = self.terminal.borrow(); - let rows = terminal.screen().physical_rows; - terminal - .selection_range() - .map(|r| r.clip_to_viewport(terminal.get_viewport_offset(), rows)) - } - - fn selection_text(&self) -> Option { - let terminal = self.terminal.borrow(); - Some(terminal.get_selection_text()) - } - fn is_mouse_grabbed(&self) -> bool { self.terminal.borrow().is_mouse_grabbed() } diff --git a/src/mux/tab.rs b/src/mux/tab.rs index 02cf05f7c..c0919a7b8 100644 --- a/src/mux/tab.rs +++ b/src/mux/tab.rs @@ -7,7 +7,6 @@ use portable_pty::PtySize; use std::cell::RefMut; use std::sync::{Arc, Mutex}; use term::color::ColorPalette; -use term::selection::SelectionRange; use term::{Clipboard, KeyCode, KeyModifiers, MouseEvent, TerminalHost}; static TAB_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::AtomicUsize::new(0); @@ -70,12 +69,6 @@ pub trait Tab: Downcast { fn set_clipboard(&self, _clipboard: &Arc) {} - /// Returns the selection range adjusted to the viewport - /// (eg: it has been normalized and had clip_to_viewport called - /// on it prior to being returned) - fn selection_range(&self) -> Option; - fn selection_text(&self) -> Option; - fn trickle_paste(&self, text: String) -> anyhow::Result<()> { if text.len() <= PASTE_CHUNK_SIZE { // Send it all now diff --git a/src/server/listener.rs b/src/server/listener.rs index e0d02f641..33242636a 100644 --- a/src/server/listener.rs +++ b/src/server/listener.rs @@ -742,7 +742,7 @@ impl ClientSession { let highlight = tab.renderer().current_highlight().as_ref().cloned(); Ok(Pdu::SendMouseEventResponse(SendMouseEventResponse { - selection_range: tab.selection_range(), + selection_range: None, highlight, })) }) diff --git a/src/server/tab.rs b/src/server/tab.rs index 6546297e9..56e46699c 100644 --- a/src/server/tab.rs +++ b/src/server/tab.rs @@ -317,22 +317,6 @@ impl Tab for ClientTab { self.client.local_domain_id } - fn selection_range(&self) -> Option { - *self - .renderable - .borrow() - .inner - .borrow() - .selection_range - .lock() - .unwrap() - } - - fn selection_text(&self) -> Option { - // FIXME: get selection from peer or the surface - None - } - fn is_mouse_grabbed(&self) -> bool { // FIXME: get the real state from the remote true diff --git a/src/termwiztermtab.rs b/src/termwiztermtab.rs index 0d33ab810..7f829f2c6 100644 --- a/src/termwiztermtab.rs +++ b/src/termwiztermtab.rs @@ -316,22 +316,6 @@ impl Tab for TermWizTerminalTab { self.domain_id } - fn selection_range(&self) -> Option { - *self - .renderable - .borrow() - .inner - .borrow() - .selection_range - .lock() - .unwrap() - } - - fn selection_text(&self) -> Option { - // FIXME: grab it from the surface - None - } - fn is_mouse_grabbed(&self) -> bool { true }