aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/private/helpers.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/api/private/helpers.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/api/private/helpers.c')
-rw-r--r--src/nvim/api/private/helpers.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index fb3a73ad4a..2056cb07e3 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -391,8 +391,10 @@ void set_option_to(uint64_t channel_id, void *to, int type,
stringval = (char *)value.data.string.data;
}
- const scid_T save_current_SID = current_SID;
- current_SID = channel_id == LUA_INTERNAL_CALL ? SID_LUA : SID_API_CLIENT;
+ const sctx_T save_current_sctx = current_sctx;
+ current_sctx.sc_sid =
+ channel_id == LUA_INTERNAL_CALL ? SID_LUA : SID_API_CLIENT;
+ current_sctx.sc_lnum = 0;
current_channel_id = channel_id;
const int opt_flags = (type == SREQ_WIN && !(flags & SOPT_GLOBAL))
@@ -401,7 +403,7 @@ void set_option_to(uint64_t channel_id, void *to, int type,
set_option_value_for(name.data, numval, stringval,
opt_flags, type, to, err);
- current_SID = save_current_SID;
+ current_sctx = save_current_sctx;
}
#define TYPVAL_ENCODE_ALLOW_SPECIALS false