mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
commit
d458d46f81
2 changed files with 20 additions and 4 deletions
|
|
@ -142,6 +142,8 @@
|
|||
(https://codeberg.org/dnkl/foot/issues/547).
|
||||
* Crash when a line wrapping OSC-8 URI crossed the scrollback wrap
|
||||
around (https://codeberg.org/dnkl/foot/issues/552).
|
||||
* Selection incorrectly wrapping rows ending with an explicit newline
|
||||
(https://codeberg.org/dnkl/foot/issues/565).
|
||||
|
||||
|
||||
### Security
|
||||
|
|
|
|||
22
selection.c
22
selection.c
|
|
@ -258,14 +258,21 @@ selection_find_word_boundary_left(struct terminal *term, struct coord *pos,
|
|||
int next_col = pos->col - 1;
|
||||
int next_row = pos->row;
|
||||
|
||||
const struct row *row = grid_row_in_view(term->grid, next_row);
|
||||
|
||||
/* Linewrap */
|
||||
if (next_col < 0) {
|
||||
next_col = term->cols - 1;
|
||||
if (--next_row < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
const struct row *row = grid_row_in_view(term->grid, next_row);
|
||||
row = grid_row_in_view(term->grid, next_row);
|
||||
|
||||
if (row->linebreak) {
|
||||
/* Hard linebreak, treat as space. I.e. break selection */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
c = row->cells[next_col].wc;
|
||||
while (c >= CELL_SPACER) {
|
||||
|
|
@ -330,14 +337,21 @@ selection_find_word_boundary_right(struct terminal *term, struct coord *pos,
|
|||
int next_col = pos->col + 1;
|
||||
int next_row = pos->row;
|
||||
|
||||
const struct row *row = grid_row_in_view(term->grid, next_row);
|
||||
|
||||
/* Linewrap */
|
||||
if (next_col >= term->cols) {
|
||||
if (row->linebreak) {
|
||||
/* Hard linebreak, treat as space. I.e. break selection */
|
||||
break;
|
||||
}
|
||||
|
||||
next_col = 0;
|
||||
if (++next_row >= term->rows)
|
||||
break;
|
||||
}
|
||||
|
||||
const struct row *row = grid_row_in_view(term->grid, next_row);
|
||||
row = grid_row_in_view(term->grid, next_row);
|
||||
}
|
||||
|
||||
c = row->cells[next_col].wc;
|
||||
while (c >= CELL_SPACER) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue