From 50ca5316f979b03c575b093019186fd2433d79d1 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 10 Apr 2024 13:36:07 -0400 Subject: [PATCH] fix: don't allow pasted contents to include the destination. --- src/app.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index 45e858e..d543b12 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1111,7 +1111,8 @@ impl Application for App { } } } - Message::PasteContents(to, contents) => { + Message::PasteContents(to, mut contents) => { + contents.paths.retain(|p| p != &to); if !contents.paths.is_empty() { match contents.kind { ClipboardKind::Copy => {