From 7170de19714acd5efa6979ef94de2a29e41d6173 Mon Sep 17 00:00:00 2001 From: b-r-o-c-k Date: Sun, 29 Apr 2018 21:02:17 -0500 Subject: api: Make nvim_set_option() update `:verbose set ...` Make `:verbose set ...` show when an option was last modified by an API client or Lua script/chunk. In the case of an API client, the channel ID is displayed. --- src/nvim/option_defs.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/option_defs.h') diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h index 66a49fd6e0..670af1cc76 100644 --- a/src/nvim/option_defs.h +++ b/src/nvim/option_defs.h @@ -3,6 +3,7 @@ #include "nvim/types.h" #include "nvim/macros.h" // For EXTERN +#include "eval/typval.h" // For scid_T // option_defs.h: definition of global variables for settable options @@ -821,4 +822,10 @@ enum { #define SB_MAX 100000 // Maximum 'scrollback' value. +/// Stores an identifier of a script or channel that last set an option. +typedef struct { + scid_T script_id; /// Script ID or one of SID_* special values. + uint64_t channel_id; /// Only used when script_id is SID_API_CLIENT. +} LastSet; + #endif // NVIM_OPTION_DEFS_H -- cgit