Caveat emptor - TOCTOU.
Unified · Split
| @@ -1522,9 +1522,11 @@ let save1 bb leavebirdseye x h dc = · 1521 unmodified lines | ||
| 1522 | 1522 | | View |
| 1523 | 1523 | | LinkNav _ -> () |
| 1524 | 1524 | end; |
| 1525 | − let key = try Digest.file docpath |> Digest.to_hex | |
| 1526 | − with _ -> E.s in | |
| 1527 | − { conf with autoscrollstep; key } | |
| 1525 | + let key = | |
| 1526 | + if emptystr conf.key | |
| 1527 | + then (try Digest.file docpath |> Digest.to_hex with _ -> E.s) | |
| 1528 | + else conf.key | |
| 1529 | + in { conf with autoscrollstep; key } | |
| 1528 | 1530 | ) |
| 1529 | 1531 | state.bookmarks |
| 1530 | 1532 | (now ()) |
| @@ -17,4 +17,3 @@ · 16 unmodified lines | ||
| 17 | 17 | just 2 threads (event loop, display/mupdf rendering) is not fast |
| 18 | 18 | enough. |
| 19 | 19 | * TODO wikit - https://github.com/moosotc/llpp/issues/128 |
| 20 | −* TODO digest caching | |