diff options
| author | Sergey Nazaryev <sergey@nazaryev.com> | 2020-10-10 18:13:08 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-10-11 17:27:07 +0000 |
| commit | e842f4936740477a28357e8238455253aa2f02de (patch) | |
| tree | 7ce16825a017c9740147f4e06501575cc4eef418 | |
| parent | config: bind shift+insert to primary-paste by default (diff) | |
selection: use appropriate check for PRIMARY paste
Assume it could be a copy-paste typo. We should check PRIMARY, not
CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything
to CLIPBOARD.
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | selection.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5747cf99..7142cbe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ * Crash after either resizing a window or changing the font size if there were sixels present in the scrollback while doing so. * _Send Device Attributes_ to only send a response if `Ps == 0`. +* Paste from primary when clipboard is empty. ### Security diff --git a/selection.c b/selection.c index 6cfacc02..7c814467 100644 --- a/selection.c +++ b/selection.c @@ -1381,8 +1381,8 @@ selection_from_primary(struct seat *seat, struct terminal *term) return; } - struct wl_clipboard *clipboard = &seat->clipboard; - if (clipboard->data_offer == NULL) + struct wl_primary *primary = &seat->primary; + if (primary->data_offer == NULL) return; term->is_sending_paste_data = true; |
