mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
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:
@@ -581,7 +581,8 @@ Object nvim_buf_get_option(Buffer buffer, String name, Error *err)
|
||||
/// @param name Option name
|
||||
/// @param value Option value
|
||||
/// @param[out] err Error details, if any
|
||||
void nvim_buf_set_option(Buffer buffer, String name, Object value, Error *err)
|
||||
void nvim_buf_set_option(uint64_t channel_id, Buffer buffer,
|
||||
String name, Object value, Error *err)
|
||||
FUNC_API_SINCE(1)
|
||||
{
|
||||
buf_T *buf = find_buffer_by_handle(buffer, err);
|
||||
@@ -590,7 +591,7 @@ void nvim_buf_set_option(Buffer buffer, String name, Object value, Error *err)
|
||||
return;
|
||||
}
|
||||
|
||||
set_option_to(buf, SREQ_BUF, name, value, err);
|
||||
set_option_to(channel_id, buf, SREQ_BUF, name, value, err);
|
||||
}
|
||||
|
||||
/// Gets the buffer number
|
||||
|
Reference in New Issue
Block a user