refactor(plines): remove implicit curwin plines() function

This commit is contained in:
Björn Linse
2021-08-10 22:32:08 +02:00
parent a2909aa35f
commit a177c7df09
8 changed files with 41 additions and 42 deletions

View File

@@ -5122,11 +5122,13 @@ static void nv_scroll(cmdarg_T *cap)
--n;
break;
}
used += plines(curwin->w_topline + n);
if (used >= half)
used += plines_win(curwin, curwin->w_topline + n, true);
if (used >= half) {
break;
if (hasFolding(curwin->w_topline + n, NULL, &lnum))
}
if (hasFolding(curwin->w_topline + n, NULL, &lnum)) {
n = lnum - curwin->w_topline;
}
}
if (n > 0 && used > curwin->w_height_inner) {
n--;