Commit: patch 9.2.0615: sixel encoder drops pixels on the right edge of shapes

1 view
Skip to first unread message

Christian Brabandt

unread,
4:45 PM (5 hours ago) 4:45 PM
to vim...@googlegroups.com
patch 9.2.0615: sixel encoder drops pixels on the right edge of shapes

Commit: https://github.com/vim/vim/commit/76a6dd1cdad2280dc9c58a005cc1eb33dda45dc0
Author: Yasuhiro Matsumoto <matt...@gmail.com>
Date: Wed Jun 10 20:32:27 2026 +0000

patch 9.2.0615: sixel encoder drops pixels on the right edge of shapes

Problem: sixel encoder drops pixels on the right edge of shapes
(after v9.2.0612)
Solution: Update xmax only when the new x is greater, mirroring the
existing xmin handling (Yasuhiro Matsumoto)

The per-colour xmax was updated with an unconditional assignment while
filling the band row by row, so it held the right edge of the last row
containing the colour instead of the maximum over all six rows.
Compare before updating, like xmin.

closes: #20468

Signed-off-by: Yasuhiro Matsumoto <matt...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/sixel.c b/src/sixel.c
index b285e05cb..4d7ef53c2 100644
--- a/src/sixel.c
+++ b/src/sixel.c
@@ -598,7 +598,8 @@ sixel_encode(image_rgb_T *img)
{
if (x < band_state->xmin[pix])
band_state->xmin[pix] = x;
- band_state->xmax[pix] = x;
+ if (x > band_state->xmax[pix])
+ band_state->xmax[pix] = x;
}
band_state->bits[(size_t)pix * width + x] |= rowmask;
}
diff --git a/src/version.c b/src/version.c
index 9b9abccd7..319f43ba6 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 615,
/**/
614,
/**/
Reply all
Reply to author
Forward
0 new messages