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:
12
src/window.c
12
src/window.c
@@ -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
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user