Fix flicker when reverting last hunk from the project diff view (#26706)
Closes #26696 Closes #ISSUE Release Notes: - git: Fix flicker when reverting last hunk in project diff view
This commit is contained in:
parent
2edadd9352
commit
8361c32a34
1 changed files with 6 additions and 1 deletions
|
@ -308,7 +308,7 @@ impl ProjectDiff {
|
|||
|
||||
fn handle_editor_event(
|
||||
&mut self,
|
||||
_: &Entity<Editor>,
|
||||
editor: &Entity<Editor>,
|
||||
event: &EditorEvent,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
|
@ -330,6 +330,11 @@ impl ProjectDiff {
|
|||
}
|
||||
_ => {}
|
||||
}
|
||||
if editor.focus_handle(cx).contains_focused(window, cx) {
|
||||
if self.multibuffer.read(cx).is_empty() {
|
||||
self.focus_handle.focus(window)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn load_buffers(&mut self, cx: &mut Context<Self>) -> Vec<Task<Result<DiffBuffer>>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue