Handle setting git blame delay to 0 (#10626)

Release Notes:


- N/A
This commit is contained in:
Thorsten Ball 2024-04-16 17:25:24 +02:00 committed by GitHub
parent 7928095951
commit 5c5fb972d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8920,16 +8920,18 @@ impl Editor {
}
fn start_git_blame_inline(&mut self, user_triggered: bool, cx: &mut ViewContext<Self>) {
if let Some(inline_blame_settings) = ProjectSettings::get_global(cx).git.inline_blame {
self.start_git_blame(user_triggered, cx);
if inline_blame_settings.delay_ms.is_some() {
if ProjectSettings::get_global(cx)
.git
.inline_blame_delay()
.is_some()
{
self.start_inline_blame_timer(cx);
} else {
self.show_git_blame_inline = true
}
}
}
pub fn blame(&self) -> Option<&Model<GitBlame>> {
self.blame.as_ref()