From 2f784e7ae71c07e02f318f9a6d3c45c586253e59 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sat, 17 Feb 2024 20:42:23 +0800 Subject: [PATCH] fix: if block in paste command was wrong --- yazi-core/src/manager/commands/paste.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yazi-core/src/manager/commands/paste.rs b/yazi-core/src/manager/commands/paste.rs index a968bbe5..e1612e37 100644 --- a/yazi-core/src/manager/commands/paste.rs +++ b/yazi-core/src/manager/commands/paste.rs @@ -18,11 +18,11 @@ impl Manager { let opt = opt.into() as Opt; let dest = self.cwd(); - if !self.yanked.cut { + if self.yanked.cut { + tasks.file_cut(&self.yanked, dest, opt.force); + self.unyank(()); + } else { tasks.file_copy(&self.yanked, dest, opt.force, opt.follow); } - - tasks.file_cut(&self.yanked, dest, opt.force); - self.unyank(()); } }