mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.1.0864: cannot have a local value for 'scrolloff' and 'sidescrolloff'
Problem: Cannot have a local value for 'scrolloff' and 'sidescrolloff'. (Gary Holloway) Solution: Make 'scrolloff' and 'sidescrolloff' global-local. (mostly by Aron Widforss, closes #3539)
This commit is contained in:
@@ -4594,6 +4594,10 @@ win_alloc(win_T *after UNUSED, int hidden UNUSED)
|
||||
new_wp->w_cursor.lnum = 1;
|
||||
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;
|
||||
|
||||
/* We won't calculate w_fraction until resizing the window */
|
||||
new_wp->w_fraction = 0;
|
||||
new_wp->w_prev_fraction_row = -1;
|
||||
@@ -5871,7 +5875,7 @@ scroll_to_fraction(win_T *wp, int prev_height)
|
||||
|
||||
if (wp == curwin)
|
||||
{
|
||||
if (p_so)
|
||||
if (get_scrolloff_value())
|
||||
update_topline();
|
||||
curs_columns(FALSE); /* validate w_wrow */
|
||||
}
|
||||
|
Reference in New Issue
Block a user