diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-05-12 08:17:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-12 08:17:21 +0200 |
commit | 36b2e3f743aaeb27531e67079d1a20bb4ac75e35 (patch) | |
tree | 75063f22b1a90605b6f2aee0233729eaf06306b4 /src/nvim/api/private/helpers.c | |
parent | 273d2cd5d5cfc7616c76d3531e9938750abcc05e (diff) | |
parent | 137eedb4edab1643b47282cce4ca07dd2ee42a63 (diff) | |
download | rneovim-36b2e3f743aaeb27531e67079d1a20bb4ac75e35.tar.gz rneovim-36b2e3f743aaeb27531e67079d1a20bb4ac75e35.tar.bz2 rneovim-36b2e3f743aaeb27531e67079d1a20bb4ac75e35.zip |
Merge #8375 'API: nvim_get_commands'
closes #7833
ref #8029
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index b922036893..17ee3ed711 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -685,7 +685,7 @@ tabpage_T *find_tab_by_handle(Tabpage tabpage, Error *err) String cchar_to_string(char c) { char buf[] = { c, NUL }; - return (String) { + return (String){ .data = xmemdupz(buf, 1), .size = (c != NUL) ? 1 : 0 }; @@ -701,13 +701,13 @@ String cchar_to_string(char c) String cstr_to_string(const char *str) { if (str == NULL) { - return (String) STRING_INIT; + return (String)STRING_INIT; } size_t len = strlen(str); - return (String) { - .data = xmemdupz(str, len), - .size = len + return (String){ + .data = xmemdupz(str, len), + .size = len, }; } @@ -722,7 +722,7 @@ String cstr_to_string(const char *str) String cbuf_to_string(const char *buf, size_t size) FUNC_ATTR_NONNULL_ALL { - return (String) { + return (String){ .data = xmemdupz(buf, size), .size = size }; @@ -737,9 +737,9 @@ String cbuf_to_string(const char *buf, size_t size) String cstr_as_string(char *str) FUNC_ATTR_PURE { if (str == NULL) { - return (String) STRING_INIT; + return (String)STRING_INIT; } - return (String) { .data = str, .size = strlen(str) }; + return (String){ .data = str, .size = strlen(str) }; } /// Converts from type Object to a VimL value. @@ -1149,7 +1149,7 @@ void api_set_error(Error *err, ErrorType errType, const char *format, ...) /// /// @param mode The abbreviation for the mode /// @param buf The buffer to get the mapping array. NULL for global -/// @returns An array of maparg() like dictionaries describing mappings +/// @returns Array of maparg()-like dictionaries describing mappings ArrayOf(Dictionary) keymap_array(String mode, buf_T *buf) { Array mappings = ARRAY_DICT_INIT; |