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)
This commit is contained in:
bryce 2016-02-11 12:53:31 -08:00
parent 3fd060c215
commit bff8a924b1
1 changed files with 1 additions and 1 deletions

View File

@ -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):