mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
feat(lua): add missing changes to autocmds lost in the rebase
Note: some of these changes are breaking, like change of API signatures
This commit is contained in:
@@ -406,6 +406,7 @@ void set_option_to(uint64_t channel_id, void *to, int type, String name, Object
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
buf_T *find_buffer_by_handle(Buffer buffer, Error *err)
|
||||
{
|
||||
if (buffer == 0) {
|
||||
@@ -1614,8 +1615,8 @@ int find_sid(uint64_t channel_id)
|
||||
{
|
||||
switch (channel_id) {
|
||||
case VIML_INTERNAL_CALL:
|
||||
// TODO(autocmd): Figure out what this should be
|
||||
// return SID_API_CLIENT;
|
||||
// TODO(autocmd): Figure out what this should be
|
||||
// return SID_API_CLIENT;
|
||||
case LUA_INTERNAL_CALL:
|
||||
return SID_LUA;
|
||||
default:
|
||||
|
@@ -152,13 +152,15 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
#define WITH_SCRIPT_CONTEXT(channel_id, code) \
|
||||
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; \
|
||||
code; \
|
||||
current_sctx = save_current_sctx;
|
||||
do { \
|
||||
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; \
|
||||
code; \
|
||||
current_sctx = save_current_sctx; \
|
||||
} while (0);
|
||||
|
||||
|
||||
#endif // NVIM_API_PRIVATE_HELPERS_H
|
||||
|
Reference in New Issue
Block a user