mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-29 07:58:01 -04:00
selection: copy selected text to the target configured by ‘selection-target’
Closes #288
This commit is contained in:
parent
a0afae747b
commit
76e8d3f483
1 changed files with 14 additions and 1 deletions
15
selection.c
15
selection.c
|
|
@ -655,7 +655,20 @@ selection_finalize(struct seat *seat, struct terminal *term, uint32_t serial)
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(term->selection.start.row <= term->selection.end.row);
|
assert(term->selection.start.row <= term->selection.end.row);
|
||||||
selection_to_primary(seat, term, serial);
|
|
||||||
|
switch (term->conf->selection_target) {
|
||||||
|
case SELECTION_TARGET_PRIMARY:
|
||||||
|
selection_to_primary(seat, term, serial);
|
||||||
|
break;
|
||||||
|
case SELECTION_TARGET_CLIPBOARD:
|
||||||
|
selection_to_clipboard(seat, term, serial);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SELECTION_TARGET_BOTH:
|
||||||
|
selection_to_primary(seat, term, serial);
|
||||||
|
selection_to_clipboard(seat, term, serial);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue