Skip to content

Commit 929a73a

Browse files
authored
Only use natural copy/paste if something to act on (#1588)
1 parent 3e488b0 commit 929a73a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Widgets/Terminal.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ public class Code.Terminal : Gtk.Box {
234234
}
235235

236236
if (CONTROL_MASK in modifiers && pantheon_terminal_settings.get_boolean ("natural-copy-paste")) {
237-
if (match_keycode (Gdk.Key.c, keycode)) {
237+
if (match_keycode (Gdk.Key.c, keycode) && terminal.get_has_selection ()) {
238238
actions.activate_action (ACTION_COPY, null);
239239
return Gdk.EVENT_STOP;
240-
} else if (match_keycode (Gdk.Key.v, keycode)) {
240+
} else if (match_keycode (Gdk.Key.v, keycode) && current_clipboard.wait_is_text_available ()) {
241241
actions.activate_action (ACTION_PASTE, null);
242242
return Gdk.EVENT_STOP;
243243
}

0 commit comments

Comments
 (0)