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:
parent
11552cc0bd
commit
bbc7fcc54f
4 changed files with 94 additions and 29 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue