mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +00:00
Revert "refactor(options): set option value for non-current context directly" (#31924)
Reverts #31112
This commit is contained in:
@@ -81,12 +81,6 @@ typedef struct {
|
||||
OptValData data;
|
||||
} OptVal;
|
||||
|
||||
/// Context that an option is being set for.
|
||||
typedef struct {
|
||||
win_T *win;
|
||||
buf_T *buf;
|
||||
} OptCtx;
|
||||
|
||||
/// :set operator types
|
||||
typedef enum {
|
||||
OP_NONE = 0,
|
||||
@@ -128,7 +122,8 @@ typedef struct {
|
||||
/// length of the error buffer
|
||||
size_t os_errbuflen;
|
||||
|
||||
OptCtx os_ctx;
|
||||
void *os_win;
|
||||
void *os_buf;
|
||||
} optset_T;
|
||||
|
||||
/// Type for the callback function that is invoked after an option value is
|
||||
@@ -197,12 +192,3 @@ typedef struct {
|
||||
OptVal def_val; ///< default value
|
||||
LastSet last_set; ///< script in which the option was last set
|
||||
} vimoption_T;
|
||||
|
||||
/// Execute code with autocmd context
|
||||
#define WITH_AUCMD_CONTEXT(ctx, code) \
|
||||
do { \
|
||||
aco_save_T _aco; \
|
||||
aucmd_prepbuf_win(&_aco, ctx.buf, ctx.win); \
|
||||
code; \
|
||||
aucmd_restbuf(&_aco); \
|
||||
} while (0)
|
||||
|
Reference in New Issue
Block a user