diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-05-10 23:37:56 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-05-11 13:20:43 +0200 |
commit | 9fa7727ce047e8e2e13f9fbf60d5defe9cf45060 (patch) | |
tree | 004351a01979a8c680a47243705dfc1df782fb06 /src/nvim/api/vim.c | |
parent | 25b630484023716977c3fe2790c13b41f9db9f30 (diff) | |
download | rneovim-9fa7727ce047e8e2e13f9fbf60d5defe9cf45060.tar.gz rneovim-9fa7727ce047e8e2e13f9fbf60d5defe9cf45060.tar.bz2 rneovim-9fa7727ce047e8e2e13f9fbf60d5defe9cf45060.zip |
API: nvim_get_commands(): always return keys
- Always return all keys, with at least NIL value.
- Require `opts` param to be {"builtin":false}
- Validate `opts` param
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 38e64fd6ed..065b8d1ce2 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -959,17 +959,17 @@ ArrayOf(Dictionary) nvim_get_keymap(String mode) return keymap_array(mode, NULL); } -/// Gets a list of dictionaries describing global(non-buffer) commands. +/// Gets a list of maps describing global |user-commands|. /// -/// @param opts Holds the API Metadata describing what type of commands -/// are needed. +/// @param opts Optional parameters. Currently only supports +/// {"builtin":false} /// @param[out] err Error details, if any. /// /// @returns Array of dictionaries describing commands. ArrayOf(Dictionary) nvim_get_commands(Dictionary opts, Error *err) FUNC_API_SINCE(4) { - return commands_array(NULL); + return nvim_buf_get_commands(-1, opts, err); } /// Returns a 2-tuple (Array), where item 0 is the current channel id and item |