Skip to content

Possible conflicts in docs of nvim_create_autocmd and nvim_exec_autocmds #21964

@lucario387

Description

@lucario387

Problem

nvim_exec_autocmds() docs wrote the data attribute to be

                 • data (any): arbitrary data to send to the autocommand
                   callback. See |nvim_create_autocmd()| for details.

Which implies nvim_exec_autocmds will pass data to autocmd callback, and that there is a key of nvim_create_autocmd that will represent the sent data
But nvim_create_autocmd() docs wrote that

                   • data: (any) arbitrary data passed to
                     |nvim_exec_autocmds()|

Which implies the data field here is passing data to nvim_exec_autocmds, and there is no mention in the docs of which key will be receiving the data from nvim_exec_autocmds

Expected behavior

I suggest the data field of nvim_create_autocmd to be changed to

data (any) arbitrary data received from |nvim_exec_autocmds()|

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions