Fix two bugs in new diff hunk handling (#23990)
Closes https://github.com/zed-industries/zed/issues/23981 Release Notes: - Fixed a crash that could happen when expanding certain diff hunks - Fixed a bug where diff hunks were not syntax highlighted when reopening a project with previously-opened buffers.
This commit is contained in:
parent
9c3482083b
commit
b6e54ae2f1
3 changed files with 9 additions and 5 deletions
|
@ -2223,7 +2223,9 @@ impl BufferChangeSet {
|
|||
let base_text = cx.background_executor().spawn(snapshot).await;
|
||||
this.update(&mut cx, |this, cx| {
|
||||
this.base_text = Some(base_text);
|
||||
cx.notify();
|
||||
cx.emit(BufferChangeSetEvent::DiffChanged {
|
||||
changed_range: text::Anchor::MIN..text::Anchor::MAX,
|
||||
});
|
||||
})
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue