Mercurial > vim
comparison src/ex_cmds.c @ 15713:ad8b2c109b22 v8.1.0864
patch 8.1.0864: cannot have a local value for 'scrolloff' and 'sidescrolloff'
commit https://github.com/vim/vim/commit/375e3390078e740d3c83b0c118c50d9a920036c7
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 31 18:26:10 2019 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 31 Jan 2019 18:30:08 +0100 |
parents | 6f1c7e9a6393 |
children | 93b78c4a7cd5 |
comparison
equal
deleted
inserted
replaced
15712:bc1989f9bd37 | 15713:ad8b2c109b22 |
---|---|
3782 #ifdef FEAT_SPELL | 3782 #ifdef FEAT_SPELL |
3783 int did_get_winopts = FALSE; | 3783 int did_get_winopts = FALSE; |
3784 #endif | 3784 #endif |
3785 int readfile_flags = 0; | 3785 int readfile_flags = 0; |
3786 int did_inc_redrawing_disabled = FALSE; | 3786 int did_inc_redrawing_disabled = FALSE; |
3787 long *so_ptr = curwin->w_p_so >= 0 ? &curwin->w_p_so : &p_so; | |
3787 | 3788 |
3788 if (eap != NULL) | 3789 if (eap != NULL) |
3789 command = eap->do_ecmd_cmd; | 3790 command = eap->do_ecmd_cmd; |
3790 set_bufref(&old_curbuf, curbuf); | 3791 set_bufref(&old_curbuf, curbuf); |
3791 | 3792 |
4387 | 4388 |
4388 --RedrawingDisabled; | 4389 --RedrawingDisabled; |
4389 did_inc_redrawing_disabled = FALSE; | 4390 did_inc_redrawing_disabled = FALSE; |
4390 if (!skip_redraw) | 4391 if (!skip_redraw) |
4391 { | 4392 { |
4392 n = p_so; | 4393 n = *so_ptr; |
4393 if (topline == 0 && command == NULL) | 4394 if (topline == 0 && command == NULL) |
4394 p_so = 999; /* force cursor halfway the window */ | 4395 *so_ptr = 9999; // force cursor halfway the window |
4395 update_topline(); | 4396 update_topline(); |
4396 curwin->w_scbind_pos = curwin->w_topline; | 4397 curwin->w_scbind_pos = curwin->w_topline; |
4397 p_so = n; | 4398 *so_ptr = n; |
4398 redraw_curbuf_later(NOT_VALID); /* redraw this buffer later */ | 4399 redraw_curbuf_later(NOT_VALID); /* redraw this buffer later */ |
4399 } | 4400 } |
4400 | 4401 |
4401 if (p_im) | 4402 if (p_im) |
4402 need_start_insertmode = TRUE; | 4403 need_start_insertmode = TRUE; |