diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-02-11 18:36:31 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-02-11 18:36:31 +0000 |
| commit | b28a742a0032bbd54c6429257e06d453b131e0fa (patch) | |
| tree | a42c822a9d7b5aa7a978e43043b8190703701349 | |
| parent | render: resize: calculated cursor row *should* never be beyond the screen bottom (diff) | |
selection: handle line break at last column correctly
Insert a newline into the selection even if the last column contained
a printable character, *if* that column also has linefeed=1.
| -rw-r--r-- | selection.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/selection.c b/selection.c index 2c7bc0b2..f1485f45 100644 --- a/selection.c +++ b/selection.c @@ -212,7 +212,8 @@ extract_one(struct terminal *term, struct row *row, struct cell *cell, struct extract *ctx = data; if (ctx->last_row != NULL && row != ctx->last_row && - ((term->selection.kind == SELECTION_NORMAL && ctx->last_cell->wc == 0) || + ((term->selection.kind == SELECTION_NORMAL && + (ctx->last_cell->wc == 0 || ctx->last_cell->attrs.linefeed)) || term->selection.kind == SELECTION_BLOCK)) { /* Last cell was the last column in the selection */ |
