aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_editor.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-11 22:12:32 +0800
committerGitHub <noreply@github.com>2023-06-11 22:12:32 +0800
commitbde59e81473f29944ef80ff98f6b2c88010b2df6 (patch)
tree95462bacec741f2b820f25cc37ac66303f6e9248 /runtime/lua/vim/_editor.lua
parentdcb341315a7d8490685036122a3ac2a09499a245 (diff)
downloadrneovim-bde59e81473f29944ef80ff98f6b2c88010b2df6.tar.gz
rneovim-bde59e81473f29944ef80ff98f6b2c88010b2df6.tar.bz2
rneovim-bde59e81473f29944ef80ff98f6b2c88010b2df6.zip
fix(remote): restore previous --remote-expr output formatting (#23988)
- Use tostring() as that's what print() uses internally. - Do not append trailing new line.
Diffstat (limited to 'runtime/lua/vim/_editor.lua')
-rw-r--r--runtime/lua/vim/_editor.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua
index dc396b8f65..1c7eb30b03 100644
--- a/runtime/lua/vim/_editor.lua
+++ b/runtime/lua/vim/_editor.lua
@@ -940,14 +940,13 @@ function vim._cs_remote(rcid, server_addr, connect_error, args)
if rcid == 0 then
return { errmsg = connection_failure_errmsg('Send failed.') }
end
- vim.fn.rpcrequest(rcid, 'nvim_input', args[2])
+ vim.rpcrequest(rcid, 'nvim_input', args[2])
return { should_exit = true, tabbed = false }
elseif subcmd == 'expr' then
if rcid == 0 then
return { errmsg = connection_failure_errmsg('Send expression failed.') }
end
- local expr = 'string(' .. args[2] .. ')'
- local res = vim.fn.rpcrequest(rcid, 'nvim_eval', expr)
+ local res = tostring(vim.rpcrequest(rcid, 'nvim_eval', args[2]))
return { result = res, should_exit = true, tabbed = false }
elseif subcmd ~= '' then
return { errmsg = 'Unknown option argument: ' .. args[1] }