From 454c3baac113a28ad32b8780589cc9604b51e530 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 10 Oct 2024 11:15:23 -0600 Subject: [PATCH] Allow clone of text thumbnail --- src/tab.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tab.rs b/src/tab.rs index 2e82075..c41a14c 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -1065,8 +1065,10 @@ impl Clone for ItemThumbnail { Self::NotImage => Self::NotImage, Self::Image(handle, size_opt) => Self::Image(handle.clone(), *size_opt), Self::Svg(handle) => Self::Svg(handle.clone()), - // Content cannot be cloned - Self::Text(content) => Self::NotImage, + // Content cannot be cloned simply + Self::Text(content) => { + Self::Text(widget::text_editor::Content::with_text(&content.text())) + } } } }