mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
selection: copy selected text to the target configured by ‘selection-target’
Closes #288
This commit is contained in:
parent
e69ca255b0
commit
07f6b3b1af
1 changed files with 14 additions and 1 deletions
15
selection.c
15
selection.c
|
|
@ -1017,7 +1017,20 @@ selection_finalize(struct seat *seat, struct terminal *term, uint32_t serial)
|
|||
}
|
||||
|
||||
xassert(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue