Skip to content

Commit

Permalink
no longer coping empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Nokse22 committed Aug 4, 2023
1 parent 7e901c8 commit f7afc1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f7afc1b

Please sign in to comment.