Skip to content

Commit d530ac9

Browse files
committed
Only try to store paste URL in clipboard if user did not abort.
1 parent 560b7a3 commit d530ac9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bpython/gtk_.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,9 @@ def on_suggestion_selection_changed(self, selection, word):
624624
def do_paste(self, widget):
625625
clipboard = gtk.clipboard_get()
626626
paste_url = self.pastebin()
627-
clipboard.set_text(paste_url)
628-
clipboard.store()
627+
if paste_url:
628+
clipboard.set_text(paste_url)
629+
clipboard.store()
629630

630631
def do_write2file(self, widget):
631632
self.write2file()

0 commit comments

Comments
 (0)