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)
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 6d03d88..a3974c1 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3784,6 +3784,7 @@
 #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 @@
     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 */
     }