]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0388: strange indent in update_topline() v9.2.0388
authorzeertzjq <zeertzjq@outlook.com>
Wed, 22 Apr 2026 16:09:06 +0000 (16:09 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 22 Apr 2026 16:09:06 +0000 (16:09 +0000)
Problem:  strange indent in update_topline()
Solution: Fix the indentation (zeertzjq)

closes: #20033

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/move.c
src/version.c

index 943eb519f8cc0a0f014701cd20eb4e07e4798c43..14271240fd72b3220f1883f5bab48bf4602afa72 100644 (file)
@@ -477,39 +477,40 @@ update_topline(void)
        {
            if (curwin->w_cursor.lnum < curwin->w_botline)
            {
-             if (((long)curwin->w_cursor.lnum
+               if (((long)curwin->w_cursor.lnum
                                           >= (long)curwin->w_botline - *so_ptr
 #ifdef FEAT_FOLDING
                        || hasAnyFolding(curwin)
 #endif
                        ))
-             {
-               lineoff_T       loff;
-
-               // Cursor is (a few lines) above botline, check if there are
-               // 'scrolloff' window lines below the cursor.  If not, need to
-               // scroll.
-               n = eof_pressure ? 0 : curwin->w_empty_rows;
-               loff.lnum = curwin->w_cursor.lnum;
+               {
+                   lineoff_T   loff;
+
+                   // Cursor is (a few lines) above botline, check if there
+                   // are 'scrolloff' window lines below the cursor.
+                   // If not, need to scroll.
+                   n = eof_pressure ? 0 : curwin->w_empty_rows;
+                   loff.lnum = curwin->w_cursor.lnum;
 #ifdef FEAT_FOLDING
-               // In a fold go to its last line.
-               (void)hasFolding(loff.lnum, NULL, &loff.lnum);
+                   // In a fold go to its last line.
+                   (void)hasFolding(loff.lnum, NULL, &loff.lnum);
 #endif
 #ifdef FEAT_DIFF
-               loff.fill = 0;
-               n += curwin->w_filler_rows;
+                   loff.fill = 0;
+                   n += curwin->w_filler_rows;
 #endif
-               loff.height = 0;
-               while (loff.lnum < curwin->w_botline
+                   loff.height = 0;
+                   while (loff.lnum < curwin->w_botline
 #ifdef FEAT_DIFF
-                       && (loff.lnum + 1 < curwin->w_botline || loff.fill == 0)
+                           && (loff.lnum + 1 < curwin->w_botline
+                                                            || loff.fill == 0)
 #endif
-                       )
-               {
-                   n += loff.height;
-                   if (n >= *so_ptr)
-                       break;
-                   botline_forw(&loff);
+                           )
+                   {
+                       n += loff.height;
+                       if (n >= *so_ptr)
+                           break;
+                       botline_forw(&loff);
                    }
                    if (n >= *so_ptr && !eof_pressure)
                        // sufficient context, no need to scroll
index b2be3d98b582e0ec29b2eaed069fe73ee06766d0..95f20bc670ac884f7b03dc2ea50e55152fe91993 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    388,
 /**/
     387,
 /**/