Update 2025-07-16

This commit is contained in:
2025-07-16 15:33:59 +03:00
parent 1a19d1112b
commit eb47813a34
20 changed files with 553 additions and 248 deletions

View File

@@ -2,12 +2,10 @@ local M = {}
function M:peek(job)
local child = Command("transmission-show")
:args({
tostring(job.file.url),
})
:stdout(Command.PIPED)
:stderr(Command.PIPED)
:spawn()
:arg(tostring(job.file.url))
:stdout(Command.PIPED)
:stderr(Command.PIPED)
:spawn()
if not child then
return require("code"):peek(job)
@@ -33,8 +31,8 @@ function M:peek(job)
if job.skip > 0 and i < job.skip + limit then
ya.manager_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))
ya.preview_widgets(job, { ui.Text.parse(lines):area(job.area) })
lines = lines:gsub("\t", string.rep(" ", rt.preview.tab_size))
ya.preview_widget(job, { ui.Text.parse(lines):area(job.area) })
end
end
@@ -43,4 +41,3 @@ function M:seek(job)
end
return M