Fix crash when toggling deleted hunk (#27138)

Release Notes:

- Fix rare crash when toggling deleted hunks.

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
João Marcos 2025-03-24 16:25:56 -03:00 committed by GitHub
parent 11552cc0bd
commit bbc7fcc54f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 94 additions and 29 deletions

View file

@ -1176,6 +1176,11 @@ impl FakeFs {
self.state.lock().events_paused = true;
}
pub fn unpause_events_and_flush(&self) {
self.state.lock().events_paused = false;
self.flush_events(usize::MAX);
}
pub fn buffered_event_count(&self) -> usize {
self.state.lock().buffered_events.len()
}