ElyPDF worker: a failed undo re-reads the history mark (P-11)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-10 00:09:26 -04:00
1 parent bc133169e3
commit 6b3ba569dd
2 files changed
+6 -2

No files matched your search

@@ -68,7 +68,11 @@ impl Doc {
return Err(io::Error::other(format!("nothing to {}", if redo { "redo" } else { "undo" })));
}
loop {
mupdf.undo(&self.open, redo)?;
if let Err(error) = mupdf.undo(&self.open, redo) {
// MuPDF may have moved part way; follow it.
self.at = mupdf.state(&self.open)?.0;
return Err(error);
}
let passed = match redo {
true => {
self.at += 1;