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.
This commit is contained in:
b-r-o-c-k
2018-04-29 21:02:17 -05:00
parent 4744142fad
commit 7170de1971
11 changed files with 103 additions and 43 deletions

View File

@@ -237,7 +237,7 @@ typedef struct {
char_u *wo_winhl;
# define w_p_winhl w_onebuf_opt.wo_winhl // 'winhighlight'
int wo_scriptID[WV_COUNT]; /* SIDs for window-local options */
LastSet wo_scriptID[WV_COUNT]; /* SIDs for window-local options */
# define w_p_scriptID w_onebuf_opt.wo_scriptID
} winopt_T;
@@ -590,7 +590,7 @@ struct file_buffer {
*/
bool b_p_initialized; /* set when options initialized */
int b_p_scriptID[BV_COUNT]; /* SIDs for buffer-local options */
LastSet b_p_scriptID[BV_COUNT]; /* SIDs for buffer-local options */
int b_p_ai; ///< 'autoindent'
int b_p_ai_nopaste; ///< b_p_ai saved for paste mode