]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0615: sixel encoder drops pixels on the right edge of shapes v9.2.0615
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Wed, 10 Jun 2026 20:32:27 +0000 (20:32 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 10 Jun 2026 20:32:27 +0000 (20:32 +0000)
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 <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/sixel.c
src/version.c

index b285e05cbb14784e01f987129e05a30117a7cf79..4d7ef53c2a8b5cf3c8a8343c86fa8908751bf109 100644 (file)
@@ -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;
            }
index 9b9abccd7bf6abab23a3a3d9214a3bc67d6da743..319f43ba672ee7bc125fbe5d3494eec35a9c7776 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    615,
 /**/
     614,
 /**/