mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-03 08:54:04 +00:00
Don't consider scan as being complete until its state is Idle
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
d8f7054f28
commit
45b41465e1
1 changed files with 2 additions and 2 deletions
|
@ -118,8 +118,8 @@ impl Worktree {
|
||||||
let scan_id = self.snapshot.scan_id;
|
let scan_id = self.snapshot.scan_id;
|
||||||
ctx.spawn_stream(
|
ctx.spawn_stream(
|
||||||
self.scan_state.1.clone(),
|
self.scan_state.1.clone(),
|
||||||
move |this, _, ctx| {
|
move |this, scan_state, ctx| {
|
||||||
if this.snapshot.scan_id > scan_id {
|
if matches!(scan_state, ScanState::Idle) && this.snapshot.scan_id > scan_id {
|
||||||
ctx.halt_stream();
|
ctx.halt_stream();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue