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 <[email protected]>
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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

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,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1wXPnM-008TWg-8j%40256bit.org.

Raspunde prin e-mail lui