aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--sixel.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef9c986a..d92676d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -78,8 +78,10 @@
after a cursor move ([#2383][2383]).
* Dracula theme updated to latest official, and light theme alucard
added.
+* Sixels: pan/pad clamped to 5 ([#2371][2371]).
[2383]: https://codeberg.org/dnkl/foot/issues/2383
+[2371]: https://codeberg.org/dnkl/foot/issues/2371
### Deprecated
diff --git a/sixel.c b/sixel.c
index 187f1348..0c1ccd1b 100644
--- a/sixel.c
+++ b/sixel.c
@@ -1888,8 +1888,8 @@ decgra(struct terminal *term, uint8_t c)
unsigned ph = nparams > 2 ? term->sixel.params[2] : 0;
unsigned pv = nparams > 3 ? term->sixel.params[3] : 0;
- pan = pan > 0 ? pan : 1;
- pad = pad > 0 ? pad : 1;
+ pan = pan > 0 ? min(pan, 5) : 1;
+ pad = pad > 0 ? min(pad, 5) : 1;
if (likely(term->sixel.image.width == 0 &&
term->sixel.image.height == 0))