mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 06:18:16 +00:00
vim-patch:8.2.2236: 'scroll' option can change when setting the statusline
Problem: 'scroll' option can change when setting the statusline or tabline
but the option context is not updated.
Solution: Update the script context when the scroll option is changed as a
side effect. (Christian Brabandt, closes vim/vim#7533)
746670604a
This commit is contained in:
@@ -5960,9 +5960,17 @@ void win_new_width(win_T *wp, int width)
|
||||
|
||||
void win_comp_scroll(win_T *wp)
|
||||
{
|
||||
const long old_w_p_scr = wp->w_p_scr;
|
||||
|
||||
wp->w_p_scr = wp->w_height / 2;
|
||||
if (wp->w_p_scr == 0)
|
||||
if (wp->w_p_scr == 0) {
|
||||
wp->w_p_scr = 1;
|
||||
}
|
||||
if (wp->w_p_scr != old_w_p_scr) {
|
||||
// Used by "verbose set scroll".
|
||||
wp->w_p_script_ctx[WV_SCROLL].script_ctx.sc_sid = SID_WINLAYOUT;
|
||||
wp->w_p_script_ctx[WV_SCROLL].script_ctx.sc_lnum = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user