Update 2025-04-26

This commit is contained in:
2025-04-26 23:21:08 +03:00
parent 1077cee297
commit 90d846ea20
13 changed files with 1137 additions and 511 deletions

View File

@@ -46,13 +46,13 @@ function M:peek(job)
child:start_kill()
if job.skip > 0 and i < job.skip + limit then
ya.manager_emit("peek", {
ya.mgr_emit("peek", {
math.max(0, i - limit),
only_if = job.file.url,
upper_bound = true,
})
else
lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size))
lines = lines:gsub("\t", string.rep(" ", rt.preview.tab_size))
ya.preview_widgets(job, { ui.Text.parse(lines):area(job.area) })
end
end
@@ -67,7 +67,7 @@ function M:seek(job)
local scroll_offset = job.units
-- Emit a new peek event with the updated skip value.
ya.manager_emit("peek", {
ya.mgr_emit("peek", {
math.max(0, cx.active.preview.skip + scroll_offset),
only_if = job.file.url,
})