lsp: Send DidOpen notifications when changing selections in multi buffer (#22958)
Fixes #22773 Release Notes: - Fixed an edge case with multibuffers that could break language features within them.
This commit is contained in:
parent
f700268029
commit
b6b06cf6d8
5 changed files with 54 additions and 34 deletions
|
@ -2197,7 +2197,7 @@ pub mod tests {
|
|||
|
||||
let fs = FakeFs::new(cx.background_executor.clone());
|
||||
fs.insert_tree(
|
||||
"/dir",
|
||||
path!("/dir"),
|
||||
json!({
|
||||
"one.rs": "const ONE: usize = 1;",
|
||||
"two.rs": "const TWO: usize = one::ONE + one::ONE;",
|
||||
|
@ -2206,7 +2206,7 @@ pub mod tests {
|
|||
}),
|
||||
)
|
||||
.await;
|
||||
let project = Project::test(fs.clone(), ["/dir".as_ref()], cx).await;
|
||||
let project = Project::test(fs.clone(), [path!("/dir").as_ref()], cx).await;
|
||||
let window = cx.add_window(|window, cx| Workspace::test_new(project.clone(), window, cx));
|
||||
let workspace = window.root(cx).unwrap();
|
||||
let search = cx.new(|cx| ProjectSearch::new(project.clone(), cx));
|
||||
|
@ -2564,7 +2564,7 @@ pub mod tests {
|
|||
|
||||
let fs = FakeFs::new(cx.background_executor.clone());
|
||||
fs.insert_tree(
|
||||
"/dir",
|
||||
path!("/dir"),
|
||||
json!({
|
||||
"one.rs": "const ONE: usize = 1;",
|
||||
"two.rs": "const TWO: usize = one::ONE + one::ONE;",
|
||||
|
@ -2573,7 +2573,7 @@ pub mod tests {
|
|||
}),
|
||||
)
|
||||
.await;
|
||||
let project = Project::test(fs.clone(), ["/dir".as_ref()], cx).await;
|
||||
let project = Project::test(fs.clone(), [path!("/dir").as_ref()], cx).await;
|
||||
let window = cx.add_window(|window, cx| Workspace::test_new(project, window, cx));
|
||||
let workspace = window;
|
||||
let search_bar = window.build_entity(cx, |_, _| ProjectSearchBar::new());
|
||||
|
@ -2859,7 +2859,7 @@ pub mod tests {
|
|||
|
||||
let fs = FakeFs::new(cx.background_executor.clone());
|
||||
fs.insert_tree(
|
||||
"/dir",
|
||||
path!("/dir"),
|
||||
json!({
|
||||
"a": {
|
||||
"one.rs": "const ONE: usize = 1;",
|
||||
|
@ -2984,7 +2984,7 @@ pub mod tests {
|
|||
|
||||
let fs = FakeFs::new(cx.background_executor.clone());
|
||||
fs.insert_tree(
|
||||
"/dir",
|
||||
path!("/dir"),
|
||||
json!({
|
||||
"one.rs": "const ONE: usize = 1;",
|
||||
"two.rs": "const TWO: usize = one::ONE + one::ONE;",
|
||||
|
@ -2993,7 +2993,7 @@ pub mod tests {
|
|||
}),
|
||||
)
|
||||
.await;
|
||||
let project = Project::test(fs.clone(), ["/dir".as_ref()], cx).await;
|
||||
let project = Project::test(fs.clone(), [path!("/dir").as_ref()], cx).await;
|
||||
let window = cx.add_window(|window, cx| Workspace::test_new(project, window, cx));
|
||||
let workspace = window.root(cx).unwrap();
|
||||
let search_bar = window.build_entity(cx, |_, _| ProjectSearchBar::new());
|
||||
|
@ -3693,7 +3693,7 @@ pub mod tests {
|
|||
// We need many lines in the search results to be able to scroll the window
|
||||
let fs = FakeFs::new(cx.background_executor.clone());
|
||||
fs.insert_tree(
|
||||
"/dir",
|
||||
path!("/dir"),
|
||||
json!({
|
||||
"1.txt": "\n\n\n\n\n A \n\n\n\n\n",
|
||||
"2.txt": "\n\n\n\n\n A \n\n\n\n\n",
|
||||
|
@ -3718,7 +3718,7 @@ pub mod tests {
|
|||
}),
|
||||
)
|
||||
.await;
|
||||
let project = Project::test(fs.clone(), ["/dir".as_ref()], cx).await;
|
||||
let project = Project::test(fs.clone(), [path!("/dir").as_ref()], cx).await;
|
||||
let window = cx.add_window(|window, cx| Workspace::test_new(project.clone(), window, cx));
|
||||
let workspace = window.root(cx).unwrap();
|
||||
let search = cx.new(|cx| ProjectSearch::new(project, cx));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue