From 9055ee7d22ad8abd92c42d21ae43f7375796de40 Mon Sep 17 00:00:00 2001 From: hankertrix <91734413+hankertrix@users.noreply.github.com> Date: Fri, 2 May 2025 13:54:24 +0800 Subject: [PATCH] fix --- yazi-core/src/tab/commands/copy.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yazi-core/src/tab/commands/copy.rs b/yazi-core/src/tab/commands/copy.rs index 6024801e..cd013961 100644 --- a/yazi-core/src/tab/commands/copy.rs +++ b/yazi-core/src/tab/commands/copy.rs @@ -1,4 +1,4 @@ -use std::{borrow::Cow, ffi::{OsStr, OsString}, path::Path, iter::once}; +use std::{borrow::Cow, ffi::{OsStr, OsString}, path::Path}; use yazi_plugin::CLIPBOARD; use yazi_shared::event::CmdCow; @@ -32,7 +32,7 @@ impl Tab { let mut it = self.selected_or_hovered().peekable(); if opt.hovered { if let Some(hovered) = self.hovered() { - it = once(hovered).peekable(); + it = Box::new(hovered.map(|h| vec![&h.url]).into_iter()); } else { return }; } while let Some(u) = it.next() {