Restore project diff test (#21606)
Restores a basic project diff test Release Notes: - N/A --------- Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
co-authored by
Cole Miller
parent
787c75cbda
commit
1efd165ead
@@ -49,6 +49,7 @@ struct SharedBuffer {
|
||||
unstaged_changes: Option<Model<BufferChangeSet>>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct BufferChangeSet {
|
||||
pub buffer_id: BufferId,
|
||||
pub base_text: Option<Model<Buffer>>,
|
||||
@@ -1045,6 +1046,12 @@ impl BufferStore {
|
||||
.spawn(async move { task.await.map_err(|e| anyhow!("{e}")) })
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn set_change_set(&mut self, buffer_id: BufferId, change_set: Model<BufferChangeSet>) {
|
||||
self.loading_change_sets
|
||||
.insert(buffer_id, Task::ready(Ok(change_set)).shared());
|
||||
}
|
||||
|
||||
pub async fn open_unstaged_changes_internal(
|
||||
this: WeakModel<Self>,
|
||||
text: Result<Option<String>>,
|
||||
|
||||
Reference in New Issue
Block a user