aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option_defs.h
diff options
context:
space:
mode:
authorb-r-o-c-k <brockmammen@gmail.com>2018-04-29 21:02:17 -0500
committerb-r-o-c-k <brockmammen@gmail.com>2018-05-03 21:05:20 -0500
commit7170de19714acd5efa6979ef94de2a29e41d6173 (patch)
treeaef99101c9b9926704fdc0ec59ee7102af26631e /src/nvim/option_defs.h
parent4744142fad9209a1adaa190b9bf16ddcbcb67ca9 (diff)
downloadrneovim-7170de19714acd5efa6979ef94de2a29e41d6173.tar.gz
rneovim-7170de19714acd5efa6979ef94de2a29e41d6173.tar.bz2
rneovim-7170de19714acd5efa6979ef94de2a29e41d6173.zip
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.
Diffstat (limited to 'src/nvim/option_defs.h')
-rw-r--r--src/nvim/option_defs.h7
1 files changed, 7 insertions, 0 deletions
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