aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-05 14:10:32 -0700
committerJustin M. Keyes <justinkz@gmail.com>2019-09-05 14:10:32 -0700
commit8b06231612cd608b2dce5e0a09bf40192a4803cb (patch)
tree04fbfef7b326574e296b2fe1a772829ac0af8be4 /src/nvim/buffer.c
parent096212d52c6375c19c046d86a7178bae91e287fc (diff)
parentd3f1eb3024fa297c970a79dd24ef818e4aeb8525 (diff)
downloadrneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.tar.gz
rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.tar.bz2
rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.zip
Merge #10869 'vim-patch:8.1.{0309,0362,0365,0515,1946}'
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 6cb1da04be..8fd4360aed 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -5064,7 +5064,6 @@ chk_modeline(
int retval = OK;
char_u *save_sourcing_name;
linenr_T save_sourcing_lnum;
- scid_T save_SID;
prev = -1;
for (s = ml_get(lnum); *s != NUL; s++) {
@@ -5152,15 +5151,17 @@ chk_modeline(
if (*s != NUL) { // skip over an empty "::"
const int secure_save = secure;
- save_SID = current_SID;
- current_SID = SID_MODELINE;
+ const sctx_T save_current_sctx = current_sctx;
+ current_sctx.sc_sid = SID_MODELINE;
+ current_sctx.sc_seq = 0;
+ current_sctx.sc_lnum = 0;
// Make sure no risky things are executed as a side effect.
secure = 1;
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
secure = secure_save;
- current_SID = save_SID;
+ current_sctx = save_current_sctx;
if (retval == FAIL) { // stop if error found
break;
}