diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-01-14 15:12:49 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-01-14 15:12:49 +0000 |
| commit | 2e46811953fc1c858e446ea4301d785a2079d404 (patch) | |
| tree | f1e88be4620935f59e21c7bb910c389dab2e139a | |
| parent | readme: add IME to the feature list (diff) | |
| parent | sixel: current geometry: don’t exceed current window dimensions (diff) | |
Merge branch 'sixel-current-geometry-response'
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | sixel.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 24e6dfe2..4245280e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,8 @@ * Pasting URIs from the clipboard when the source has not newline-terminated the last URI (https://codeberg.org/dnkl/foot/issues/291). +* Sixel “current geometry” query response not being bounded by the + current window dimensions (fixes `lsix` output) ### Security @@ -1145,7 +1145,8 @@ sixel_geometry_report_current(struct terminal *term) { char reply[64]; snprintf(reply, sizeof(reply), "\033[?2;0;%u;%uS", - term->sixel.max_width, term->sixel.max_height); + min(term->cols * term->cell_width, term->sixel.max_width), + min(term->rows * term->cell_height, term->sixel.max_height)); term_to_slave(term, reply, strlen(reply)); LOG_DBG("query response for current sixel geometry: %ux%u", |
