fix: don't allow pasted contents to include the destination.

This commit is contained in:
Ashley Wulber 2024-04-10 13:36:07 -04:00 committed by Ashley Wulber
parent 926a16ce2e
commit 50ca5316f9

View file

@ -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 => {