mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
selection: copy: insert line break if either cell is empty
This commit is contained in:
parent
1a8ccb0ffa
commit
6902c22a77
2 changed files with 5 additions and 1 deletions
|
|
@ -20,6 +20,9 @@
|
||||||
|
|
||||||
* Background transparency to only be used with the default background
|
* Background transparency to only be used with the default background
|
||||||
color.
|
color.
|
||||||
|
* Copy to clipboard/primary selection to insert a line break if either
|
||||||
|
the last cell on the previous line or the first cell on the next
|
||||||
|
line is empty.
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,8 @@ extract_one(struct terminal *term, struct row *row, struct cell *cell,
|
||||||
|
|
||||||
if (ctx->last_row != NULL && row != ctx->last_row &&
|
if (ctx->last_row != NULL && row != ctx->last_row &&
|
||||||
((term->selection.kind == SELECTION_NORMAL &&
|
((term->selection.kind == SELECTION_NORMAL &&
|
||||||
ctx->last_row->linebreak) ||
|
(ctx->last_row->linebreak ||
|
||||||
|
ctx->empty_count > 0 || cell->wc == 0)) ||
|
||||||
term->selection.kind == SELECTION_BLOCK))
|
term->selection.kind == SELECTION_BLOCK))
|
||||||
{
|
{
|
||||||
/* Last cell was the last column in the selection */
|
/* Last cell was the last column in the selection */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue