aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-01-16 14:39:44 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-12 09:55:50 +0000
commit9db9a0d22515f90a75ec09deb900308e7604ad5a (patch)
tree55d7dbee91985d48dc2438f09b68476b8b09a617 /selection.c
parentselection: copy selected text to the target configured by ‘selection-target’ (diff)
config: add ‘none’ as a possible value for ‘selection-target’
When ‘selection-target’ is set to ‘none’, selecting text does not copy the text to _any_ clipboard. This patch also refactors the value parsing to be data driven.
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/selection.c b/selection.c
index fd1b1661..2b209ae2 100644
--- a/selection.c
+++ b/selection.c
@@ -657,6 +657,9 @@ selection_finalize(struct seat *seat, struct terminal *term, uint32_t serial)
assert(term->selection.start.row <= term->selection.end.row);
switch (term->conf->selection_target) {
+ case SELECTION_TARGET_NONE:
+ break;
+
case SELECTION_TARGET_PRIMARY:
selection_to_primary(seat, term, serial);
break;