diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-01-06 09:53:27 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-01-06 09:53:27 +0000 |
| commit | 3a9172342fd69c09d3fddfb26eba12dcbe1e5149 (patch) | |
| tree | 8fc6ff4bb902a56f9148cfa9fba1c454a2c3f2be /extract.c | |
| parent | Merge branch 'extend-selection-by-word' (diff) | |
selection: combine enum selection_kind with selection_semantic
Diffstat (limited to 'extract.c')
| -rw-r--r-- | extract.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -119,9 +119,7 @@ extract_one(const struct terminal *term, const struct row *row, if (ctx->last_row != NULL && row != ctx->last_row) { /* New row - determine if we should insert a newline or not */ - if (ctx->selection_kind == SELECTION_NONE || - ctx->selection_kind == SELECTION_NORMAL) - { + if (ctx->selection_kind != SELECTION_BLOCK) { if (ctx->last_row->linebreak || ctx->empty_count > 0 || cell->wc == 0) @@ -134,9 +132,7 @@ extract_one(const struct terminal *term, const struct row *row, ctx->newline_count++; ctx->empty_count = 0; } - } - - else if (ctx->selection_kind == SELECTION_BLOCK) { + } else { /* Always insert a linebreak */ if (!ensure_size(ctx, 1)) goto err; |
