From f7afc1bebca0521be18ec546aa1b5b843bd36994 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 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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):