refactor: pass the window to get_(side)scrolloff_value

to less rely on curwin
This commit is contained in:
Matthieu Coudron
2020-12-23 16:21:10 +01:00
parent 5ce328df40
commit 4d9520ec86
7 changed files with 22 additions and 20 deletions

View File

@@ -7362,7 +7362,7 @@ static void ex_syncbind(exarg_T *eap)
topline = curwin->w_topline;
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
if (wp->w_p_scb && wp->w_buffer) {
y = wp->w_buffer->b_ml.ml_line_count - get_scrolloff_value();
y = wp->w_buffer->b_ml.ml_line_count - get_scrolloff_value(curwin);
if (topline > y) {
topline = y;
}