forked from aniani/vim
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:
@@ -3784,6 +3784,7 @@ do_ecmd(
|
||||
#endif
|
||||
int readfile_flags = 0;
|
||||
int did_inc_redrawing_disabled = FALSE;
|
||||
long *so_ptr = curwin->w_p_so >= 0 ? &curwin->w_p_so : &p_so;
|
||||
|
||||
if (eap != NULL)
|
||||
command = eap->do_ecmd_cmd;
|
||||
@@ -4389,12 +4390,12 @@ do_ecmd(
|
||||
did_inc_redrawing_disabled = FALSE;
|
||||
if (!skip_redraw)
|
||||
{
|
||||
n = p_so;
|
||||
n = *so_ptr;
|
||||
if (topline == 0 && command == NULL)
|
||||
p_so = 999; /* force cursor halfway the window */
|
||||
*so_ptr = 9999; // force cursor halfway the window
|
||||
update_topline();
|
||||
curwin->w_scbind_pos = curwin->w_topline;
|
||||
p_so = n;
|
||||
*so_ptr = n;
|
||||
redraw_curbuf_later(NOT_VALID); /* redraw this buffer later */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user