mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-23 05:33:57 -04:00
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.
This commit is contained in:
parent
e56523f326
commit
b28a742a00
1 changed files with 2 additions and 1 deletions
|
|
@ -212,7 +212,8 @@ extract_one(struct terminal *term, struct row *row, struct cell *cell,
|
||||||
struct extract *ctx = data;
|
struct extract *ctx = data;
|
||||||
|
|
||||||
if (ctx->last_row != NULL && row != ctx->last_row &&
|
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))
|
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