Clear the buffer when annotation is complete, triggering the next file to load

This commit is contained in:
Josh Hansen 2023-06-29 14:54:50 -07:00
parent 3f881f0c64
commit 6f1ffae48d

View file

@ -443,7 +443,7 @@ fn main() {
let path_guard = path.lock();
let path = path_guard.as_ref().unwrap();
let buf = buf.lock();
let mut buf = buf.lock();
annotations.clear();
annotations.push(Annotation {
@ -454,7 +454,7 @@ fn main() {
});
write(&annotations, path.as_path());
buf.clear();
}
Command::AnnotateSince(class) => {
let end = *idx.lock();
@ -484,6 +484,7 @@ fn main() {
if annotation_complete(&annotations, buf.lock().len()) {
write(&annotations, path.as_path());
buf.lock().clear();
}
}
}