diff options
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index d628c517bb..cdb226b94d 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -5112,14 +5112,15 @@ chk_modeline( *e = NUL; // truncate the set command if (*s != NUL) { // skip over an empty "::" + const int secure_save = secure; save_SID = current_SID; current_SID = SID_MODELINE; // Make sure no risky things are executed as a side effect. - secure++; + secure = 1; retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags); - secure--; + secure = secure_save; current_SID = save_SID; if (retval == FAIL) { // stop if error found break; @@ -5211,8 +5212,8 @@ char_u *buf_spname(buf_T *buf) return (char_u *)_(msg_qflist); } } - /* There is no _file_ when 'buftype' is "nofile", b_sfname - * contains the name as specified by the user */ + // There is no _file_ when 'buftype' is "nofile", b_sfname + // contains the name as specified by the user. if (bt_nofile(buf)) { if (buf->b_sfname != NULL) { return buf->b_sfname; |