mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-23 01:40:12 -05:00
Merge branch 'dont-split-multi-column-chars-when-resizing-alt-screen'
This commit is contained in:
commit
2f7e5aed40
2 changed files with 7 additions and 1 deletions
|
|
@ -149,6 +149,8 @@
|
||||||
(https://codeberg.org/dnkl/foot/issues/565).
|
(https://codeberg.org/dnkl/foot/issues/565).
|
||||||
* Off-by-one error in markup of auto-detected URLs when the URL ends
|
* Off-by-one error in markup of auto-detected URLs when the URL ends
|
||||||
in the right-most column.
|
in the right-most column.
|
||||||
|
* Multi-column characters being cut in half when resizing the
|
||||||
|
alternate screen.
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
6
grid.c
6
grid.c
|
|
@ -194,11 +194,15 @@ grid_resize_without_reflow(
|
||||||
new_row->dirty = old_row->dirty;
|
new_row->dirty = old_row->dirty;
|
||||||
new_row->linebreak = false;
|
new_row->linebreak = false;
|
||||||
|
|
||||||
/* Clear "new" columns */
|
|
||||||
if (new_cols > old_cols) {
|
if (new_cols > old_cols) {
|
||||||
|
/* Clear "new" columns */
|
||||||
memset(&new_row->cells[old_cols], 0,
|
memset(&new_row->cells[old_cols], 0,
|
||||||
sizeof(struct cell) * (new_cols - old_cols));
|
sizeof(struct cell) * (new_cols - old_cols));
|
||||||
new_row->dirty = true;
|
new_row->dirty = true;
|
||||||
|
} else if (old_cols > new_cols) {
|
||||||
|
/* Make sure we don't cut a multi-column character in two */
|
||||||
|
for (int i = new_cols; i > 0 && old_row->cells[i].wc > CELL_SPACER; i--)
|
||||||
|
new_row->cells[i - 1].wc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Map sixels on current "old" row to current "new row" */
|
/* Map sixels on current "old" row to current "new row" */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue