patch 9.2.0388: strange indent in update_topline()
Commit:
https://github.com/vim/vim/commit/f194676c936d9f3a8479a72afbbe9f244039e27e
Author: zeertzjq <
zeer...@outlook.com>
Date: Wed Apr 22 16:09:06 2026 +0000
patch 9.2.0388: strange indent in update_topline()
Problem: strange indent in update_topline()
Solution: Fix the indentation (zeertzjq)
closes: #20033
Signed-off-by: zeertzjq <
zeer...@outlook.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/move.c b/src/move.c
index 943eb519f..14271240f 100644
--- a/src/move.c
+++ b/src/move.c
@@ -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
diff --git a/src/version.c b/src/version.c
index b2be3d98b..95f20bc67 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 388,
/**/
387,
/**/