mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-17 05:33:52 -04:00
Merge branch 'master' into releases/1.4
This commit is contained in:
commit
1c8e103c92
3 changed files with 31 additions and 8 deletions
20
CHANGELOG.md
20
CHANGELOG.md
|
|
@ -1,5 +1,6 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
* [Unreleased](#unreleased)
|
||||||
* [1.4.1](#1-4-1)
|
* [1.4.1](#1-4-1)
|
||||||
* [1.4.0](#1-4-0)
|
* [1.4.0](#1-4-0)
|
||||||
* [1.3.0](#1-3-0)
|
* [1.3.0](#1-3-0)
|
||||||
|
|
@ -9,6 +10,25 @@
|
||||||
* [1.2.0](#1-2-0)
|
* [1.2.0](#1-2-0)
|
||||||
|
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
### Added
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
* Maximum window title length from 100 to 2048.
|
||||||
|
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
### Removed
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Crash when overwriting a sixel and the row being overwritten did not
|
||||||
|
cover an entire cell.
|
||||||
|
* Assertion failure in debug builds when overwriting a sixel image.
|
||||||
|
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
|
||||||
## 1.4.1
|
## 1.4.1
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
3
render.c
3
render.c
|
|
@ -1660,8 +1660,7 @@ render_search_box(struct terminal *term)
|
||||||
static void
|
static void
|
||||||
render_update_title(struct terminal *term)
|
render_update_title(struct terminal *term)
|
||||||
{
|
{
|
||||||
/* TODO: figure out what the limit actually is */
|
static const size_t max_len = 2048;
|
||||||
static const size_t max_len = 100;
|
|
||||||
|
|
||||||
const char *title = term->window_title != NULL ? term->window_title : "foot";
|
const char *title = term->window_title != NULL ? term->window_title : "foot";
|
||||||
char *copy = NULL;
|
char *copy = NULL;
|
||||||
|
|
|
||||||
16
sixel.c
16
sixel.c
|
|
@ -272,7 +272,7 @@ sixel_overwrite(struct terminal *term, struct sixel *six,
|
||||||
(six->pos.row + rel_above) & (term->grid->num_rows - 1)},
|
(six->pos.row + rel_above) & (term->grid->num_rows - 1)},
|
||||||
};
|
};
|
||||||
imgs[2].data = malloc(imgs[2].width * imgs[2].height * sizeof(uint32_t));
|
imgs[2].data = malloc(imgs[2].width * imgs[2].height * sizeof(uint32_t));
|
||||||
for (size_t i = 0; i < term->cell_height; i++)
|
for (size_t i = 0; i < imgs[2].height; i++)
|
||||||
memcpy(
|
memcpy(
|
||||||
&((uint32_t *)imgs[2].data)[i * imgs[2].width],
|
&((uint32_t *)imgs[2].data)[i * imgs[2].width],
|
||||||
&((const uint32_t *)six->data)[(rel_above * term->cell_height + i) * six->width],
|
&((const uint32_t *)six->data)[(rel_above * term->cell_height + i) * six->width],
|
||||||
|
|
@ -290,7 +290,7 @@ sixel_overwrite(struct terminal *term, struct sixel *six,
|
||||||
(six->pos.row + rel_above) & (term->grid->num_rows - 1)},
|
(six->pos.row + rel_above) & (term->grid->num_rows - 1)},
|
||||||
};
|
};
|
||||||
imgs[3].data = malloc(imgs[3].width * imgs[3].height * sizeof(uint32_t));
|
imgs[3].data = malloc(imgs[3].width * imgs[3].height * sizeof(uint32_t));
|
||||||
for (size_t i = 0; i < term->cell_height; i++)
|
for (size_t i = 0; i < imgs[3].height; i++)
|
||||||
memcpy(
|
memcpy(
|
||||||
&((uint32_t *)imgs[3].data)[i * imgs[3].width],
|
&((uint32_t *)imgs[3].data)[i * imgs[3].width],
|
||||||
&((const uint32_t *)six->data)[(rel_above * term->cell_height + i) * six->width + rel_right * term->cell_width],
|
&((const uint32_t *)six->data)[(rel_above * term->cell_height + i) * six->width + rel_right * term->cell_width],
|
||||||
|
|
@ -350,9 +350,11 @@ _sixel_overwrite_by_rectangle(
|
||||||
(col <= col_end && col + width - 1 >= col_end) ||
|
(col <= col_end && col + width - 1 >= col_end) ||
|
||||||
(col >= col_start && col + width - 1 <= col_end))
|
(col >= col_start && col + width - 1 <= col_end))
|
||||||
{
|
{
|
||||||
sixel_overwrite(term, six, start, col, height, width);
|
struct sixel to_be_erased = *six;
|
||||||
sixel_erase(term, six);
|
|
||||||
tll_remove(term->grid->sixel_images, it);
|
tll_remove(term->grid->sixel_images, it);
|
||||||
|
|
||||||
|
sixel_overwrite(term, &to_be_erased, start, col, height, width);
|
||||||
|
sixel_erase(term, &to_be_erased);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -421,9 +423,11 @@ sixel_overwrite_by_row(struct terminal *term, int _row, int col, int width)
|
||||||
(col <= col_end && col + width - 1 >= col_end) ||
|
(col <= col_end && col + width - 1 >= col_end) ||
|
||||||
(col >= col_start && col + width - 1 <= col_end))
|
(col >= col_start && col + width - 1 <= col_end))
|
||||||
{
|
{
|
||||||
sixel_overwrite(term, six, row, col, 1, width);
|
struct sixel to_be_erased = *six;
|
||||||
sixel_erase(term, six);
|
|
||||||
tll_remove(term->grid->sixel_images, it);
|
tll_remove(term->grid->sixel_images, it);
|
||||||
|
|
||||||
|
sixel_overwrite(term, &to_be_erased, row, col, 1, width);
|
||||||
|
sixel_erase(term, &to_be_erased);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue