Merge branch 'main' into settings-file
This commit is contained in:
commit
6091caee8e
25 changed files with 858 additions and 227 deletions
|
@ -129,6 +129,7 @@ pub fn build_workspace(
|
|||
});
|
||||
let lsp_status = cx.add_view(|cx| {
|
||||
workspace::lsp_status::LspStatus::new(
|
||||
workspace.project(),
|
||||
app_state.languages.clone(),
|
||||
app_state.settings.clone(),
|
||||
cx,
|
||||
|
@ -775,44 +776,58 @@ mod tests {
|
|||
(file3.clone(), DisplayPoint::new(15, 0))
|
||||
);
|
||||
|
||||
workspace.update(cx, |w, cx| Pane::go_back(w, cx)).await;
|
||||
workspace
|
||||
.update(cx, |w, cx| Pane::go_back(w, None, cx))
|
||||
.await;
|
||||
assert_eq!(
|
||||
active_location(&workspace, cx),
|
||||
(file3.clone(), DisplayPoint::new(0, 0))
|
||||
);
|
||||
|
||||
workspace.update(cx, |w, cx| Pane::go_back(w, cx)).await;
|
||||
workspace
|
||||
.update(cx, |w, cx| Pane::go_back(w, None, cx))
|
||||
.await;
|
||||
assert_eq!(
|
||||
active_location(&workspace, cx),
|
||||
(file2.clone(), DisplayPoint::new(0, 0))
|
||||
);
|
||||
|
||||
workspace.update(cx, |w, cx| Pane::go_back(w, cx)).await;
|
||||
workspace
|
||||
.update(cx, |w, cx| Pane::go_back(w, None, cx))
|
||||
.await;
|
||||
assert_eq!(
|
||||
active_location(&workspace, cx),
|
||||
(file1.clone(), DisplayPoint::new(10, 0))
|
||||
);
|
||||
|
||||
workspace.update(cx, |w, cx| Pane::go_back(w, cx)).await;
|
||||
workspace
|
||||
.update(cx, |w, cx| Pane::go_back(w, None, cx))
|
||||
.await;
|
||||
assert_eq!(
|
||||
active_location(&workspace, cx),
|
||||
(file1.clone(), DisplayPoint::new(0, 0))
|
||||
);
|
||||
|
||||
// Go back one more time and ensure we don't navigate past the first item in the history.
|
||||
workspace.update(cx, |w, cx| Pane::go_back(w, cx)).await;
|
||||
workspace
|
||||
.update(cx, |w, cx| Pane::go_back(w, None, cx))
|
||||
.await;
|
||||
assert_eq!(
|
||||
active_location(&workspace, cx),
|
||||
(file1.clone(), DisplayPoint::new(0, 0))
|
||||
);
|
||||
|
||||
workspace.update(cx, |w, cx| Pane::go_forward(w, cx)).await;
|
||||
workspace
|
||||
.update(cx, |w, cx| Pane::go_forward(w, None, cx))
|
||||
.await;
|
||||
assert_eq!(
|
||||
active_location(&workspace, cx),
|
||||
(file1.clone(), DisplayPoint::new(10, 0))
|
||||
);
|
||||
|
||||
workspace.update(cx, |w, cx| Pane::go_forward(w, cx)).await;
|
||||
workspace
|
||||
.update(cx, |w, cx| Pane::go_forward(w, None, cx))
|
||||
.await;
|
||||
assert_eq!(
|
||||
active_location(&workspace, cx),
|
||||
(file2.clone(), DisplayPoint::new(0, 0))
|
||||
|
@ -826,7 +841,9 @@ mod tests {
|
|||
.update(cx, |pane, cx| pane.close_item(editor3.id(), cx));
|
||||
drop(editor3);
|
||||
});
|
||||
workspace.update(cx, |w, cx| Pane::go_forward(w, cx)).await;
|
||||
workspace
|
||||
.update(cx, |w, cx| Pane::go_forward(w, None, cx))
|
||||
.await;
|
||||
assert_eq!(
|
||||
active_location(&workspace, cx),
|
||||
(file3.clone(), DisplayPoint::new(0, 0))
|
||||
|
@ -846,12 +863,16 @@ mod tests {
|
|||
})
|
||||
.await
|
||||
.unwrap();
|
||||
workspace.update(cx, |w, cx| Pane::go_back(w, cx)).await;
|
||||
workspace
|
||||
.update(cx, |w, cx| Pane::go_back(w, None, cx))
|
||||
.await;
|
||||
assert_eq!(
|
||||
active_location(&workspace, cx),
|
||||
(file1.clone(), DisplayPoint::new(10, 0))
|
||||
);
|
||||
workspace.update(cx, |w, cx| Pane::go_forward(w, cx)).await;
|
||||
workspace
|
||||
.update(cx, |w, cx| Pane::go_forward(w, None, cx))
|
||||
.await;
|
||||
assert_eq!(
|
||||
active_location(&workspace, cx),
|
||||
(file3.clone(), DisplayPoint::new(0, 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue