From bff8a924b1ab590bacebdb01ca955924de9b2521 Mon Sep 17 00:00:00 2001 From: bryce Date: Thu, 11 Feb 2016 12:53:31 -0800 Subject: [PATCH] Make copy on select only copy to clipboard if we actually have a selection. This avoids the clipboard to be cleared if we loose selection. Like you have vim open, select some text, CTRL-Z to send vim to the background, that causes the selection to change and the clipboard to be cleared. Patch from Mattias Eriksson (merge proposal #279733) --- terminatorlib/terminal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 46128706..0d98670c 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -330,7 +330,7 @@ class Terminal(gtk.VBox): del(self.matches[name]) def maybe_copy_clipboard(self): - if self.config['copy_on_selection']: + if self.config['copy_on_selection'] and self.vte.get_has_selection(): self.vte.copy_clipboard() def connect_signals(self):