Start a test for remote git data updating
Co-Authored-By: Mikayla Maki <mikayla@zed.dev> Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
6540936970
commit
ce7f6dd082
10 changed files with 272 additions and 57 deletions
|
@ -662,6 +662,11 @@ impl Buffer {
|
|||
task
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn head_text(&self) -> Option<&str> {
|
||||
self.head_text.as_deref()
|
||||
}
|
||||
|
||||
pub fn update_head_text(&mut self, head_text: Option<String>, cx: &mut ModelContext<Self>) {
|
||||
self.head_text = head_text;
|
||||
self.git_diff_recalc(cx);
|
||||
|
@ -671,6 +676,10 @@ impl Buffer {
|
|||
self.git_diff_status.diff.needs_update(self)
|
||||
}
|
||||
|
||||
pub fn is_recalculating_git_diff(&self) -> bool {
|
||||
self.git_diff_status.update_in_progress
|
||||
}
|
||||
|
||||
pub fn git_diff_recalc(&mut self, cx: &mut ModelContext<Self>) {
|
||||
if self.git_diff_status.update_in_progress {
|
||||
self.git_diff_status.update_requested = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue