aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-16 20:29:53 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-16 20:29:53 +0000
commit6902c22a779aeb3389843a36ee41af2ab633bb07 (patch)
tree4cc828b1fe7913f6ee807e80c237b75a96cb225b /selection.c
parentselection/render: sync cells' 'selected' bit before rendering (diff)
selection: copy: insert line break if either cell is empty
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/selection.c b/selection.c
index 59cab9a7..3928e4cb 100644
--- a/selection.c
+++ b/selection.c
@@ -232,7 +232,8 @@ extract_one(struct terminal *term, struct row *row, struct cell *cell,
if (ctx->last_row != NULL && row != ctx->last_row &&
((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))
{
/* Last cell was the last column in the selection */