From c37b3cf4774f15a509dfcd2287769c825573bfc6 Mon Sep 17 00:00:00 2001 From: Nokse22 Date: Fri, 4 Aug 2023 15:42:09 +0200 Subject: [PATCH] no longer coping empty strings --- src/window.py | 3 ++- src/window.ui | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/window.py b/src/window.py index 2879b37..787de21 100644 --- a/src/window.py +++ b/src/window.py @@ -45,7 +45,8 @@ def on_copy_action(self, *args): start = text_buffer.get_start_iter() end = text_buffer.get_end_iter() text = text_buffer.get_text(start, end, False) - self.copy_to_clipboard(text) + if text.strip() != "": + self.copy_to_clipboard(text) @Gtk.Template.Callback("on_paste_action") def on_paste_action(self, *args): diff --git a/src/window.ui b/src/window.ui index 9985890..a100247 100644 --- a/src/window.ui +++ b/src/window.ui @@ -11,7 +11,6 @@ - 100