mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
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
375e339007
This commit is contained in:
@@ -2177,6 +2177,7 @@ int do_ecmd(
|
||||
int did_get_winopts = FALSE;
|
||||
int readfile_flags = 0;
|
||||
bool 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;
|
||||
@@ -2678,13 +2679,14 @@ int do_ecmd(
|
||||
RedrawingDisabled--;
|
||||
did_inc_redrawing_disabled = false;
|
||||
if (!skip_redraw) {
|
||||
n = p_so;
|
||||
if (topline == 0 && command == NULL)
|
||||
p_so = 999; // force cursor to be vertically centered in the window
|
||||
n = *so_ptr;
|
||||
if (topline == 0 && command == NULL) {
|
||||
*so_ptr = 999; // force cursor to be vertically centered in the window
|
||||
}
|
||||
update_topline();
|
||||
curwin->w_scbind_pos = curwin->w_topline;
|
||||
p_so = n;
|
||||
redraw_curbuf_later(NOT_VALID); /* redraw this buffer later */
|
||||
*so_ptr = n;
|
||||
redraw_curbuf_later(NOT_VALID); // redraw this buffer later
|
||||
}
|
||||
|
||||
if (p_im)
|
||||
|
Reference in New Issue
Block a user