]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0687: popup_image_composites_frames() has improper if block scope v9.2.0687
authorYee Cheng Chin <ychin.git@gmail.com>
Sun, 21 Jun 2026 13:35:06 +0000 (13:35 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 21 Jun 2026 13:35:06 +0000 (13:35 +0000)
Problem:  popup_image_composites_frames() has improper if block scope
Solution: Add curly braces to properly scope the if block
          (Yee Cheng Chin).

If the ifdef conditions within the if block evaluates to false, then the
generated code will have the if block apply to the next statement
instead. Use a curly brace to properly scope the if block.

related: #20478
closes:  #20584

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/popupwin.c
src/version.c

index 02ecffbfd9b4bfb8e965612d6c467360f8e72f0a..d3d27a2e173c4b765f8d9d3c73184cdb32fb72ec 100644 (file)
@@ -2070,6 +2070,7 @@ popup_image_composites_frames(void)
 {
 # ifdef FEAT_GUI
     if (gui.in_use)
+    {
 #  ifdef FEAT_IMAGE_CAIRO
        // Cairo paints the image with OPERATOR_OVER onto gui.surface, so
        // a swapped-in RGBA frame needs the cells repainted underneath.
@@ -2081,6 +2082,7 @@ popup_image_composites_frames(void)
        // render nodes, so there is no blitting in the first place.
        return false;
 #  endif
+    }
 # endif
 # ifdef FEAT_IMAGE_SIXEL
     // Sixel P2=1 transparency: unpainted pixels keep their previous
index c640b1c60ca0d5b0a92859f46aa0936e14dc3c12..75976074d8dcdca7c044c25e4650a0e0c47a5b42 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    687,
 /**/
     686,
 /**/