1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 14:22:37 +03:00
This commit is contained in:
Wez Furlong 2019-06-09 21:15:43 -07:00
parent 70579b45b7
commit f95cdfad0e
3 changed files with 8 additions and 6 deletions

View File

@ -76,5 +76,5 @@ impl Client {
rpc!(key_down, SendKeyDown, UnitResponse);
rpc!(mouse_event, SendMouseEvent, UnitResponse);
rpc!(resize, Resize, UnitResponse);
rpc!(is_tab_dead, IsTabDead, IsTabDeadResponse);
rpc!(check_tab_dead, IsTabDead, IsTabDeadResponse);
}

View File

@ -49,7 +49,7 @@ pub struct ClientSession {
struct BufferedTerminalHost<'a> {
write: std::cell::RefMut<'a, dyn std::io::Write>,
clipboard: Option<Option<String>>,
clipboard: Option<String>,
title: Option<String>,
}
@ -68,7 +68,9 @@ impl<'a> term::TerminalHost for BufferedTerminalHost<'a> {
}
fn set_clipboard(&mut self, clip: Option<String>) -> Result<(), Error> {
self.clipboard.replace(clip);
if let Some(clip) = clip {
self.clipboard.replace(clip);
}
Ok(())
}

View File

@ -96,7 +96,7 @@ impl Tab for ClientTab {
client.key_down(SendKeyDown {
tab_id: self.remote_tab_id,
event: KeyEvent {
key: key,
key,
modifiers: mods,
},
})?;
@ -119,7 +119,7 @@ impl Tab for ClientTab {
fn is_dead(&self) -> bool {
let mut client = self.client.client.lock().unwrap();
let is_dead = client
.is_tab_dead(IsTabDead {
.check_tab_dead(IsTabDead {
tab_id: self.remote_tab_id,
})
.map(|r| r.is_dead)
@ -158,7 +158,7 @@ impl Renderable for RenderableState {
fn get_cursor_position(&self) -> CursorPosition {
let coarse = self.coarse.borrow();
if let Some(coarse) = coarse.as_ref() {
coarse.cursor_position.clone()
coarse.cursor_position
} else {
CursorPosition::default()
}