mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: prevent PDF out-of-range error message from overlapping preview image
This commit is contained in:
parent
3ca33c1f84
commit
207cfa9829
1 changed files with 1 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ function M:preload(job)
|
|||
local pages = tonumber(output.stderr:match("the last page %((%d+)%)")) or 0
|
||||
if job.skip > 0 and pages > 0 then
|
||||
ya.emit("peek", { math.max(0, pages - 1), only_if = job.file.url, upper_bound = true })
|
||||
return false
|
||||
end
|
||||
return true, Err("Failed to convert PDF to image, stderr: %s", output.stderr)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue