summaryrefslogtreecommitdiff
path: root/src/misc2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-31 18:26:10 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-31 18:26:10 +0100
commit375e3390078e740d3c83b0c118c50d9a920036c7 (patch)
tree34f565d4a9351b58d48d8d06e4a84b07effdb3fd /src/misc2.c
parentb3051ce82f2e8af95ce3b6a41867f70aee5ecc82 (diff)
downloadvim-git-375e3390078e740d3c83b0c118c50d9a920036c7.tar.gz
patch 8.1.0864: cannot have a local value for 'scrolloff' and 'sidescrolloff'v8.1.0864
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)
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 657e16491..278cc330c 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -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));
}
/*