0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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 #7533)
This commit is contained in:
Bram Moolenaar
2020-12-28 15:41:41 +01:00
parent dace9f785f
commit 746670604a
6 changed files with 39 additions and 1 deletions

View File

@@ -6325,9 +6325,21 @@ win_new_width(win_T *wp, int width)
void
win_comp_scroll(win_T *wp)
{
#if defined(FEAT_EVAL)
int old_w_p_scr = wp->w_p_scr;
#endif
wp->w_p_scr = ((unsigned)wp->w_height >> 1);
if (wp->w_p_scr == 0)
wp->w_p_scr = 1;
#if defined(FEAT_EVAL)
if (wp->w_p_scr != old_w_p_scr)
{
// Used by "verbose set scroll".
wp->w_p_script_ctx[WV_SCROLL].sc_sid = SID_WINLAYOUT;
wp->w_p_script_ctx[WV_SCROLL].sc_lnum = 0;
}
#endif
}
/*