From 8f0cb6a61d88fc06aaedd8866f92485e58fdf1b3 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 9 Jan 2026 20:03:06 +0800 Subject: [PATCH] Remove `display_name` --- yazi-plugin/preset/plugins/archive.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/yazi-plugin/preset/plugins/archive.lua b/yazi-plugin/preset/plugins/archive.lua index f22dc697..4d2c4778 100644 --- a/yazi-plugin/preset/plugins/archive.lua +++ b/yazi-plugin/preset/plugins/archive.lua @@ -41,7 +41,7 @@ function M:peek(job) left[#left] = ui.Line { string.rep(" │", f.depth), left[#left], - ui.truncate(f.display_name, { + ui.truncate(f.path.name, { rtl = true, max = math.max(0, job.area.w - ui.width(left[#left]) - ui.width(right[#right])), }), @@ -291,7 +291,6 @@ function M.prepare_tree(files) size = 0, attr = "", is_dir = true, - display_name = parent.name, }) parent = parent.parent end @@ -309,7 +308,6 @@ function M.prepare_tree(files) parents[#parents] = nil end - f.display_name = f.path.name f.depth = #parents if f.is_dir then @@ -327,7 +325,6 @@ function M.prepare_tree(files) size = 0, attr = "", is_dir = true, - display_name = dirs_to_add[j].name, depth = #parents, } parents[#parents + 1] = dirs_to_add[j]