aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/move.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r--src/nvim/move.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 57c5b7d6cf..0077dc3102 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -547,13 +547,7 @@ void set_topline(win_T *wp, linenr_T lnum)
/// If the line length changed the number of screen lines might change,
/// requiring updating w_topline. That may also invalidate w_crow.
/// Need to take care of w_botline separately!
-void changed_cline_bef_curs(void)
-{
- curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW
- |VALID_CHEIGHT|VALID_TOPLINE);
-}
-
-void changed_cline_bef_curs_win(win_T *wp)
+void changed_cline_bef_curs(win_T *wp)
{
wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW
|VALID_CHEIGHT|VALID_TOPLINE);
@@ -595,13 +589,8 @@ void validate_botline(win_T *wp)
}
}
-// Mark curwin->w_botline as invalid (because of some change in the buffer).
-void invalidate_botline(void)
-{
- curwin->w_valid &= ~(VALID_BOTLINE|VALID_BOTLINE_AP);
-}
-
-void invalidate_botline_win(win_T *wp)
+// Mark wp->w_botline as invalid (because of some change in the buffer).
+void invalidate_botline(win_T *wp)
{
wp->w_valid &= ~(VALID_BOTLINE|VALID_BOTLINE_AP);
}
@@ -1276,7 +1265,7 @@ bool scrolldown(long line_count, int byfold)
}
}
curwin->w_botline--; // approximate w_botline
- invalidate_botline();
+ invalidate_botline(curwin);
}
curwin->w_wrow += done; // keep w_wrow updated
curwin->w_cline_row += done; // keep w_cline_row updated
@@ -2651,7 +2640,7 @@ void halfpage(bool flag, linenr_T Prenum)
} else {
curwin->w_cursor.lnum += n;
}
- check_cursor_lnum();
+ check_cursor_lnum(curwin);
}
} else {
// scroll the text down