aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/lua')
-rw-r--r--src/nvim/lua/executor.c2
-rw-r--r--src/nvim/lua/vim.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 02eabb9c89..a7bda9d037 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -291,7 +291,7 @@ static int nlua_print(lua_State *const lstate)
return 0;
nlua_print_error:
emsgf(_("E5114: Error while converting print argument #%i: %.*s"),
- curargidx, errmsg_len, errmsg);
+ curargidx, (int)errmsg_len, errmsg);
ga_clear(&msg_ga);
lua_pop(lstate, lua_gettop(lstate));
return 0;
diff --git a/src/nvim/lua/vim.lua b/src/nvim/lua/vim.lua
index e1bbb03d3f..47f40da72e 100644
--- a/src/nvim/lua/vim.lua
+++ b/src/nvim/lua/vim.lua
@@ -13,7 +13,7 @@ local function _os_proc_info(pid)
if pid == nil or pid <= 0 or type(pid) ~= 'number' then
error('invalid pid')
end
- local cmd = { 'ps', '-p', pid, '-o', 'ucomm=', }
+ local cmd = { 'ps', '-p', pid, '-o', 'comm=', }
local err, name = _system(cmd)
if 1 == err and string.gsub(name, '%s*', '') == '' then
return {} -- Process not found.
@@ -23,7 +23,7 @@ local function _os_proc_info(pid)
end
local _, ppid = _system({ 'ps', '-p', pid, '-o', 'ppid=', })
-- Remove trailing whitespace.
- name = string.gsub(name, '%s+$', '')
+ name = string.gsub(string.gsub(name, '%s+$', ''), '^.*/', '')
ppid = string.gsub(ppid, '%s+$', '')
ppid = tonumber(ppid) == nil and -1 or tonumber(ppid)
return {