Merge branch 'main' into keybindings-grind

This commit is contained in:
Mikayla Maki 2022-07-15 11:24:16 -07:00 committed by GitHub
commit f38206f819
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 882 additions and 468 deletions

View file

@ -16,8 +16,11 @@ pub fn deploy_modal(workspace: &mut Workspace, _: &DeployModal, cx: &mut ViewCon
if let Some(StoredConnection(stored_connection)) = possible_connection {
// Create a view from the stored connection
workspace.toggle_modal(cx, |_, cx| {
cx.add_view(|cx| Terminal::from_connection(stored_connection, true, cx))
cx.add_view(|cx| Terminal::from_connection(stored_connection.clone(), true, cx))
});
cx.set_global::<Option<StoredConnection>>(Some(StoredConnection(
stored_connection.clone(),
)));
} else {
// No connection was stored, create a new terminal
if let Some(closed_terminal_handle) = workspace.toggle_modal(cx, |workspace, cx| {

View file

@ -261,7 +261,12 @@ impl View for Terminal {
}
impl Item for Terminal {
fn tab_content(&self, tab_theme: &theme::Tab, cx: &gpui::AppContext) -> ElementBox {
fn tab_content(
&self,
_detail: Option<usize>,
tab_theme: &theme::Tab,
cx: &gpui::AppContext,
) -> ElementBox {
let settings = cx.global::<Settings>();
let search_theme = &settings.theme.search; //TODO properly integrate themes
@ -405,7 +410,7 @@ mod tests {
///Basic integration test, can we get the terminal to show up, execute a command,
//and produce noticable output?
#[gpui::test]
#[gpui::test(retries = 5)]
async fn test_terminal(cx: &mut TestAppContext) {
let terminal = cx.add_view(Default::default(), |cx| Terminal::new(None, false, cx));
@ -416,7 +421,7 @@ mod tests {
terminal.enter(&Enter, cx);
});
cx.set_condition_duration(Some(Duration::from_secs(2)));
cx.set_condition_duration(Some(Duration::from_secs(5)));
terminal
.condition(cx, |terminal, cx| {
let term = terminal.connection.read(cx).term.clone();