Render is snappier, less locking, and errors feel nicely modeled
This commit is contained in:
parent
741b78a15b
commit
ee87c8ebde
2 changed files with 3 additions and 1 deletions
|
@ -32,6 +32,7 @@ pub fn deploy_modal(workspace: &mut Workspace, _: &DeployModal, cx: &mut ViewCon
|
||||||
if let Some(closed_terminal_handle) = workspace.toggle_modal(cx, |workspace, cx| {
|
if let Some(closed_terminal_handle) = workspace.toggle_modal(cx, |workspace, cx| {
|
||||||
let wd = get_wd_for_workspace(workspace, cx);
|
let wd = get_wd_for_workspace(workspace, cx);
|
||||||
|
|
||||||
|
//TODO fix this crash
|
||||||
let this = cx.add_view(|cx| TerminalView::new(wd, true, cx).unwrap());
|
let this = cx.add_view(|cx| TerminalView::new(wd, true, cx).unwrap());
|
||||||
|
|
||||||
let connection_handle = this.read(cx).connection.0.as_ref().unwrap().clone();
|
let connection_handle = this.read(cx).connection.0.as_ref().unwrap().clone();
|
||||||
|
|
|
@ -16,7 +16,7 @@ use settings::{Settings, WorkingDirectory};
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use terminal_element::{terminal_layout_context::TerminalLayoutData, TerminalDimensions};
|
use terminal_element::{terminal_layout_context::TerminalLayoutData, TerminalDimensions};
|
||||||
|
use util::ResultExt;
|
||||||
use workspace::{Item, Workspace};
|
use workspace::{Item, Workspace};
|
||||||
|
|
||||||
use crate::terminal_element::TerminalEl;
|
use crate::terminal_element::TerminalEl;
|
||||||
|
@ -114,6 +114,7 @@ impl TerminalView {
|
||||||
cx,
|
cx,
|
||||||
))
|
))
|
||||||
} else {
|
} else {
|
||||||
|
connection.log_err();
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue