aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/move.c3
-rw-r--r--src/nvim/plines.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 9a2bae5753..89d2b69f51 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -2294,7 +2294,8 @@ void cursor_correct(win_T *wp)
int below = wp->w_filler_rows; // screen lines below botline
while ((above < above_wanted || below < below_wanted) && topline < botline) {
if (below < below_wanted && (below <= above || above >= above_wanted)) {
- below += plines_win_full(wp, botline, &botline, NULL, true, true);
+ below += plines_win_full(wp, botline, NULL, NULL, true, true);
+ hasFolding(wp, botline, &botline, NULL);
botline--;
}
if (above < above_wanted && (above < below || below >= below_wanted)) {
diff --git a/src/nvim/plines.c b/src/nvim/plines.c
index 3f0fb3795e..24efead13c 100644
--- a/src/nvim/plines.c
+++ b/src/nvim/plines.c
@@ -884,7 +884,7 @@ int plines_win_col(win_T *wp, linenr_T lnum, long column)
///
/// @param[in] wp window the line is in
/// @param[in] lnum line number
-/// @param[out] nextp if not NULL, the line after a fold
+/// @param[out] nextp if not NULL, the last line of a fold
/// @param[out] foldedp if not NULL, whether lnum is on a fold
/// @param[in] cache whether to use the window's cache for folds
/// @param[in] limit_winheight when true limit to window height