language: Make Buffer::new take an explicit ID (#2900)
See Linear description for the full explanation of the issue. This PR is mostly a mechanical change, except for the one case where we do pass in an explicit `next_id` instead of `model_id` in project.rs. Release Notes: - Fixed a bug where some results were not reported in project search in presence of unnamed buffers.
This commit is contained in:
parent
81a5043b61
commit
07b9c6c302
16 changed files with 141 additions and 104 deletions
|
@ -980,7 +980,7 @@ mod tests {
|
|||
deterministic.forbid_parking();
|
||||
let (copilot, mut lsp) = Copilot::fake(cx);
|
||||
|
||||
let buffer_1 = cx.add_model(|cx| Buffer::new(0, "Hello", cx));
|
||||
let buffer_1 = cx.add_model(|cx| Buffer::new(0, cx.model_id() as u64, "Hello"));
|
||||
let buffer_1_uri: lsp::Url = format!("buffer://{}", buffer_1.id()).parse().unwrap();
|
||||
copilot.update(cx, |copilot, cx| copilot.register_buffer(&buffer_1, cx));
|
||||
assert_eq!(
|
||||
|
@ -996,7 +996,7 @@ mod tests {
|
|||
}
|
||||
);
|
||||
|
||||
let buffer_2 = cx.add_model(|cx| Buffer::new(0, "Goodbye", cx));
|
||||
let buffer_2 = cx.add_model(|cx| Buffer::new(0, cx.model_id() as u64, "Goodbye"));
|
||||
let buffer_2_uri: lsp::Url = format!("buffer://{}", buffer_2.id()).parse().unwrap();
|
||||
copilot.update(cx, |copilot, cx| copilot.register_buffer(&buffer_2, cx));
|
||||
assert_eq!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue