diff options
author | Will Eccles <will@eccles.dev> | 2020-03-17 15:05:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-17 20:05:34 +0100 |
commit | 87d892afa0475644e91d9c8a57b7c35491c4dc32 (patch) | |
tree | a3d0f66e64156fbbb47864a6ed36129bd7c41318 /src/nvim/buffer_defs.h | |
parent | 5a5c2f0290b5cdb8ccc1a06cb41f248ab25fd792 (diff) | |
download | rneovim-87d892afa0475644e91d9c8a57b7c35491c4dc32.tar.gz rneovim-87d892afa0475644e91d9c8a57b7c35491c4dc32.tar.bz2 rneovim-87d892afa0475644e91d9c8a57b7c35491c4dc32.zip |
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
https://github.com/vim/vim/commit/375e3390078e740d3c83b0c118c50d9a920036c7
Diffstat (limited to 'src/nvim/buffer_defs.h')
-rw-r--r-- | src/nvim/buffer_defs.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index 1f943b25b6..3993f61a3d 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -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' */ - - /* transform a pointer to a "onebuf" option into a "allbuf" option */ + // 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 #define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T)) long w_scbind_pos; |