Merge lp:~snaggen/terminator/copy_on_select into lp:terminator/gtk3

Proposed by Mattias Eriksson
Status: Merged
Merge reported by: Bryce Harrington
Merged at revision: not available
Proposed branch: lp:~snaggen/terminator/copy_on_select
Merge into: lp:terminator/gtk3
Diff against target: 12 lines (+1/-1)
1 file modified
terminatorlib/terminal.py (+1/-1)
To merge this branch: bzr merge lp:~snaggen/terminator/copy_on_select
Reviewer Review Type Date Requested Status
Bryce Harrington code review Approve
Review via email: mp+279733@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Ravil Bayramgalin (brainopia) wrote :

I have the same issue.

Revision history for this message
Ravil Bayramgalin (brainopia) wrote :

I've tried the patch and it works as intented.

Revision history for this message
Bryce Harrington (bryce) wrote :

Sounds useful and change LGTM.

review: Approve (code review)
Revision history for this message
Bryce Harrington (bryce) wrote :

I've gone ahead and landed this change as r1717, to give it wider testing.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'terminatorlib/terminal.py'
2--- terminatorlib/terminal.py 2015-12-03 14:37:16 +0000
3+++ terminatorlib/terminal.py 2015-12-07 08:51:41 +0000
4@@ -329,7 +329,7 @@
5 del(self.matches[name])
6
7 def maybe_copy_clipboard(self):
8- if self.config['copy_on_selection']:
9+ if self.config['copy_on_selection'] and self.vte.get_has_selection():
10 self.vte.copy_clipboard()
11
12 def connect_signals(self):

Subscribers

People subscribed via source and target branches

to status/vote changes: