fix: 'scroll' is not set correctly for floats with 'splitkeep'

vim-patch:9.0.0780: 'scroll' value computed in unexpected location

Problem:    'scroll' value computed in unexpected location.
Solution:   Compute 'scroll' when the window height is changed. (Luuk van
            Baal, closes vim/vim#11387)
a1a46da87d
This commit is contained in:
Luuk van Baal 2022-10-16 22:34:14 +02:00 committed by zeertzjq
parent 637ab296cb
commit 46eabe1ac1

View File

@ -6119,7 +6119,6 @@ void win_fix_scroll(int resize)
invalidate_botline_win(wp);
validate_botline(wp);
}
win_comp_scroll(wp);
wp->w_prev_height = wp->w_height;
wp->w_prev_winrow = wp->w_winrow;
}
@ -6292,7 +6291,6 @@ void scroll_to_fraction(win_T *wp, int prev_height)
wp->w_prev_fraction_row = wp->w_wrow;
}
win_comp_scroll(wp);
redraw_later(wp, UPD_SOME_VALID);
wp->w_redr_status = true;
invalidate_botline_win(wp);
@ -6327,6 +6325,7 @@ void win_set_inner_size(win_T *wp, bool valid_cursor)
}
wp->w_skipcol = 0;
wp->w_height_inner = height;
win_comp_scroll(wp);
// There is no point in adjusting the scroll position when exiting. Some
// values might be invalid.