1
0
forked from aniani/vim

patch 8.2.1936: session sets the local 'scrolloff' value to the global value

Problem:    Session sets the local 'scrolloff' value to the global value.
Solution:   Do not let restoring the global option value change the local
            value.
This commit is contained in:
Bram Moolenaar
2020-11-01 17:40:54 +01:00
parent 578f4cc7d0
commit 388908352f
3 changed files with 17 additions and 2 deletions

View File

@@ -1216,7 +1216,7 @@ ex_mkrc(exarg_T *eap)
#ifdef FEAT_SESSION
if (!failed && view_session)
{
if (put_line(fd, "let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0") == FAIL)
if (put_line(fd, "let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1") == FAIL)
failed = TRUE;
if (eap->cmdidx == CMD_mksession)
{
@@ -1261,7 +1261,7 @@ ex_mkrc(exarg_T *eap)
failed |= (put_view(fd, curwin, !using_vdir, flagp, -1, NULL)
== FAIL);
}
if (put_line(fd, "let &so = s:so_save | let &siso = s:siso_save")
if (put_line(fd, "let &g:so = s:so_save | let &g:siso = s:siso_save")
== FAIL)
failed = TRUE;
#ifdef FEAT_SEARCH_EXTRA