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 c37b3cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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
1 change: 0 additions & 1 deletion src/window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<object class="GtkWindowHandle">
<child>
<object class="GtkOverlay">
<property name="height-request">100</property>

<child type="overlay">
<object class="GtkScrolledWindow">
Expand Down

0 comments on commit c37b3cf

Please sign in to comment.