diff options
author | kylo252 <59826753+kylo252@users.noreply.github.com> | 2022-09-16 09:18:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 09:18:42 +0200 |
commit | 0f93aa12fdb07fd452706da8d13c590c86ce21de (patch) | |
tree | 4bf6574ae3e37f47662ea3599499abb08323d0e3 | |
parent | 9ec4b20be695501ba166f31dec39ef9e30cc7dd8 (diff) | |
download | rneovim-0f93aa12fdb07fd452706da8d13c590c86ce21de.tar.gz rneovim-0f93aa12fdb07fd452706da8d13c590c86ce21de.tar.bz2 rneovim-0f93aa12fdb07fd452706da8d13c590c86ce21de.zip |
docs(autocmds): re-add buffer param to docstring (#20204)
-rw-r--r-- | runtime/doc/api.txt | 5 | ||||
-rw-r--r-- | src/nvim/api/autocmd.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 00a3759936..7e55bb8f4e 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3378,7 +3378,10 @@ nvim_get_autocmds({*opts}) *nvim_get_autocmds()* • event (string|array): event or events to match against |autocmd-events|. • pattern (string|array): pattern or patterns to match against - |autocmd-pattern|. + |autocmd-pattern|. Cannot be used with {buffer} + • buffer: Buffer number or list of buffer numbers for buffer + local autocommands |autocmd-buflocal|. Cannot be used with + {pattern} Return: ~ Array of autocommands matching the criteria, with each item containing diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c index 99340a3c59..ac4cb953b8 100644 --- a/src/nvim/api/autocmd.c +++ b/src/nvim/api/autocmd.c @@ -59,6 +59,9 @@ static int64_t next_autocmd_id = 1; /// - group (string|integer): the autocommand group name or id to match against. /// - event (string|array): event or events to match against |autocmd-events|. /// - pattern (string|array): pattern or patterns to match against |autocmd-pattern|. +/// Cannot be used with {buffer} +/// - buffer: Buffer number or list of buffer numbers for buffer local autocommands +/// |autocmd-buflocal|. Cannot be used with {pattern} /// @return Array of autocommands matching the criteria, with each item /// containing the following fields: /// - id (number): the autocommand id (only when defined with the API). |