aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--terminal.vala4
1 files changed, 4 insertions, 0 deletions
diff --git a/terminal.vala b/terminal.vala
index bb2083f..4a2e676 100644
--- a/terminal.vala
+++ b/terminal.vala
@@ -34,6 +34,7 @@ class Terminal : Gtk.Overlay {
[GtkChild] unowned Gtk.SearchEntry search_entry;
[GtkChild] unowned Vte.Terminal vte;
Gtk.Clipboard clipboard;
+ Gtk.Clipboard primary;
Gtk.Settings settings;
bool has_search;
@@ -65,6 +66,7 @@ class Terminal : Gtk.Overlay {
standard_context_menu.attach_to_widget(vte, null);
clipboard = Gtk.Clipboard.get_default(window.get_display());
+ primary = Gtk.Clipboard.get_for_display(window.get_display(), Gdk.SELECTION_PRIMARY);
copy_item_text.activate.connect(() => vte_copy());
copy_item_html.activate.connect(() => vte_copy(true));
@@ -308,8 +310,10 @@ class Terminal : Gtk.Overlay {
void uri_copy() {
if (url_match != null) {
clipboard.set_text(url_match, -1);
+ primary.set_text(url_match, -1);
} else if (hyperlink_match != null) {
clipboard.set_text(hyperlink_match, -1);
+ primary.set_text(hyperlink_match, -1);
}
}