1
0
forked from aniani/vim

patch 9.0.1710: scrolloff options work slightly different

Problem: sidescrolloff and scrolloff options work slightly
         different than other global-local options
Solution: Make it behave consistent for all global-local options

It was noticed, that sidescrolloff and scrolloff options behave
differently in comparison to other global-local window options like
'listchars'

So make those two behave like other global-local options. Also add some
extra documentation for a few special local-window options.

Add a few tests to make sure all global-local window options behave
similar

closes: #12956
closes: #12643

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2023-08-13 19:43:42 +02:00
parent e5e4709a6a
commit 4a8eb6e7a9
7 changed files with 133 additions and 15 deletions

View File

@@ -5546,8 +5546,8 @@ win_alloc(win_T *after, int hidden)
new_wp->w_scbind_pos = 1;
// use global option value for global-local options
new_wp->w_p_so = -1;
new_wp->w_p_siso = -1;
new_wp->w_allbuf_opt.wo_so = new_wp->w_p_so = -1;
new_wp->w_allbuf_opt.wo_siso = new_wp->w_p_siso = -1;
// We won't calculate w_fraction until resizing the window
new_wp->w_fraction = 0;