diff --git a/terminatorlib/config.py b/terminatorlib/config.py
index f9dc5620..8e248263 100644
--- a/terminatorlib/config.py
+++ b/terminatorlib/config.py
@@ -121,6 +121,7 @@ DEFAULTS = {
'putty_paste_style' : False,
'putty_paste_style_source_clipboard': False,
'smart_copy' : True,
+ 'clear_select_on_copy' : False,
'line_height' : 1.0,
'case_sensitive' : True,
},
diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade
index de9439ee..9a17abf1 100644
--- a/terminatorlib/preferences.glade
+++ b/terminatorlib/preferences.glade
@@ -605,7 +605,7 @@
- 1
+ 2
0
2
@@ -638,7 +638,7 @@
- 1
+ 2
1
2
@@ -673,7 +673,6 @@
0
3
- 3
@@ -754,7 +753,7 @@
0
6
- 3
+ 4
@@ -770,7 +769,7 @@
- 1
+ 2
2
@@ -788,10 +787,43 @@
- 2
+ 3
2
+
+
+
+ 2
+ 3
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
True
diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py
index 01a62189..bbb4218c 100755
--- a/terminatorlib/prefseditor.py
+++ b/terminatorlib/prefseditor.py
@@ -824,6 +824,11 @@ class PrefsEditor:
self.config['smart_copy'] = widget.get_active()
self.config.save()
+ def on_clear_select_on_copy_toggled(self,widget):
+ """Clear selection on smart copy"""
+ self.config['clear_select_on_copy'] = widget.get_active()
+ self.config.save()
+
def on_cursor_blink_toggled(self, widget):
"""Cursor blink setting changed"""
self.config['cursor_blink'] = widget.get_active()
diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py
index c3d52ac8..de75852c 100644
--- a/terminatorlib/terminal.py
+++ b/terminatorlib/terminal.py
@@ -1773,6 +1773,8 @@ class Terminal(Gtk.VBox):
def key_copy(self):
self.vte.copy_clipboard()
+ if self.config['clear_select_on_copy']:
+ self.vte.unselect_all()
def key_paste(self):
self.paste_clipboard()