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:
@@ -643,6 +643,7 @@ leftcol_changed(void)
|
||||
long lastcol;
|
||||
colnr_T s, e;
|
||||
int retval = FALSE;
|
||||
long siso = get_sidescrolloff_value();
|
||||
|
||||
changed_cline_bef_curs();
|
||||
lastcol = curwin->w_leftcol + curwin->w_width - curwin_col_off() - 1;
|
||||
@@ -652,15 +653,15 @@ leftcol_changed(void)
|
||||
* If the cursor is right or left of the screen, move it to last or first
|
||||
* character.
|
||||
*/
|
||||
if (curwin->w_virtcol > (colnr_T)(lastcol - p_siso))
|
||||
if (curwin->w_virtcol > (colnr_T)(lastcol - siso))
|
||||
{
|
||||
retval = TRUE;
|
||||
coladvance((colnr_T)(lastcol - p_siso));
|
||||
coladvance((colnr_T)(lastcol - siso));
|
||||
}
|
||||
else if (curwin->w_virtcol < curwin->w_leftcol + p_siso)
|
||||
else if (curwin->w_virtcol < curwin->w_leftcol + siso)
|
||||
{
|
||||
retval = TRUE;
|
||||
(void)coladvance((colnr_T)(curwin->w_leftcol + p_siso));
|
||||
(void)coladvance((colnr_T)(curwin->w_leftcol + siso));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user