mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Revert unrelated changes
This commit is contained in:
parent
6f442b75d8
commit
1d0c9a0281
1 changed files with 2 additions and 3 deletions
|
|
@ -9,13 +9,12 @@ function M:peek(job)
|
||||||
files, bound, err = self.list_compressed_tar({ "-p", tostring(job.file.path) }, job.skip, limit)
|
files, bound, err = self.list_compressed_tar({ "-p", tostring(job.file.path) }, job.skip, limit)
|
||||||
end
|
end
|
||||||
|
|
||||||
local limit = job.area.h
|
|
||||||
if err then
|
if err then
|
||||||
return ya.preview_widget(job, err)
|
return ya.preview_widget(job, err)
|
||||||
elseif job.skip > 0 and bound < job.skip + limit then
|
elseif job.skip > 0 and bound < job.skip + limit then
|
||||||
return ya.emit("peek", { math.max(0, bound - limit), only_if = job.file.url, upper_bound = true })
|
return ya.emit("peek", { math.max(0, bound - limit), only_if = job.file.url, upper_bound = true })
|
||||||
elseif #files == 0 then
|
elseif #files == 0 then
|
||||||
files = { { path = job.file.url.stem, size = 0, attr = "" } }
|
files = { { path = job.file.url.stem, size = 0, packed_size = 0, attr = "" } }
|
||||||
end
|
end
|
||||||
|
|
||||||
M.prepare_tree(files)
|
M.prepare_tree(files)
|
||||||
|
|
@ -40,7 +39,7 @@ function M:peek(job)
|
||||||
end
|
end
|
||||||
|
|
||||||
left[#left] = ui.Line {
|
left[#left] = ui.Line {
|
||||||
ui.Span(string.rep(" │", f.depth)),
|
string.rep(" │", f.depth),
|
||||||
left[#left],
|
left[#left],
|
||||||
ui.truncate(f.display_name, {
|
ui.truncate(f.display_name, {
|
||||||
rtl = true,
|
rtl = true,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue