vim-patch:8.1.0864 Make 'scrolloff' and 'sidescrolloff' options window local (#11854)

Problem: cannot have a local value for 'scrolloff' and 'sidescrolloff'

Author: Bram Moolenar

375e339007
This commit is contained in:
Will Eccles
2020-03-17 15:05:34 -04:00
committed by GitHub
parent 5a5c2f0290
commit 87d892afa0
14 changed files with 245 additions and 126 deletions

View File

@@ -1278,16 +1278,18 @@ struct window_S {
winopt_T w_onebuf_opt;
winopt_T w_allbuf_opt;
/* A few options have local flags for P_INSECURE. */
uint32_t w_p_stl_flags; /* flags for 'statusline' */
uint32_t w_p_fde_flags; /* flags for 'foldexpr' */
uint32_t w_p_fdt_flags; /* flags for 'foldtext' */
int *w_p_cc_cols; /* array of columns to highlight or NULL */
int w_p_brimin; /* minimum width for breakindent */
int w_p_brishift; /* additional shift for breakindent */
bool w_p_brisbr; /* sbr in 'briopt' */
// A few options have local flags for P_INSECURE.
uint32_t w_p_stl_flags; // flags for 'statusline'
uint32_t w_p_fde_flags; // flags for 'foldexpr'
uint32_t w_p_fdt_flags; // flags for 'foldtext'
int *w_p_cc_cols; // array of columns to highlight or NULL
int w_p_brimin; // minimum width for breakindent
int w_p_brishift; // additional shift for breakindent
bool w_p_brisbr; // sbr in 'briopt'
long w_p_siso; // 'sidescrolloff' local value
long w_p_so; // 'scrolloff' local value
/* transform a pointer to a "onebuf" option into a "allbuf" option */
// transform a pointer to a "onebuf" option into a "allbuf" option
#define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T))
long w_scbind_pos;