aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/lua/vim.lua12
-rw-r--r--src/nvim/os/fs.c2
2 files changed, 5 insertions, 9 deletions
diff --git a/src/nvim/lua/vim.lua b/src/nvim/lua/vim.lua
index 9cd8e232d5..848bccaae6 100644
--- a/src/nvim/lua/vim.lua
+++ b/src/nvim/lua/vim.lua
@@ -154,14 +154,11 @@ local function _update_package_paths()
last_nvim_paths = cur_nvim_paths
end
---- Trim whitespace (Lua pattern "%%s") from both sides of a string.
+--- Return a human-readable representation of the given object.
---
---@see https://www.lua.org/pil/20.2.html
---@param s String to trim
---@returns String with whitespace removed from its beginning and end
-local function trim(s)
- assert(type(s) == 'string', 'Only strings can be trimmed')
- return s:match('^%s*(.*%S)') or ''
+--@see https://github.com/kikito/inspect.lua
+local function inspect(object, options) -- luacheck: no unused
+ error(object, options) -- Stub for gen_vimdoc.py
end
local function __index(t, key)
@@ -180,7 +177,6 @@ local module = {
_os_proc_children = _os_proc_children,
_os_proc_info = _os_proc_info,
_system = _system,
- trim = trim,
}
setmetatable(module, {
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c
index d1d088cf24..d5500b230c 100644
--- a/src/nvim/os/fs.c
+++ b/src/nvim/os/fs.c
@@ -717,7 +717,7 @@ int os_setperm(const char *const name, int perm)
/// @return 0 on success, or libuv error code on failure.
///
/// @note If `owner` or `group` is -1, then that ID is not changed.
-int os_chown(const char* path, uv_uid_t owner, uv_gid_t group)
+int os_chown(const char *path, uv_uid_t owner, uv_gid_t group)
{
int r;
RUN_UV_FS_FUNC(r, uv_fs_chown, path, owner, group, NULL);