aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_editor.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-11 15:29:51 +0800
committerGitHub <noreply@github.com>2023-06-11 15:29:51 +0800
commitcce9460524aa17bcd4daa095f4706220b81f8845 (patch)
treec58ef3571f3745d579a872e4a054fafd846a6157 /runtime/lua/vim/_editor.lua
parent4229bbe514b7a1bc5b9f888a294cc8a323a7d869 (diff)
downloadrneovim-cce9460524aa17bcd4daa095f4706220b81f8845.tar.gz
rneovim-cce9460524aa17bcd4daa095f4706220b81f8845.tar.bz2
rneovim-cce9460524aa17bcd4daa095f4706220b81f8845.zip
fix(remote): make --remote-expr print to stdout (#23980)
Diffstat (limited to 'runtime/lua/vim/_editor.lua')
-rw-r--r--runtime/lua/vim/_editor.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua
index d46b0fbf32..dc396b8f65 100644
--- a/runtime/lua/vim/_editor.lua
+++ b/runtime/lua/vim/_editor.lua
@@ -932,7 +932,7 @@ function vim._cs_remote(rcid, server_addr, connect_error, args)
or subcmd == 'tab-wait'
or subcmd == 'tab-wait-silent'
then
- return { errmsg = 'E5600: Wait commands not yet implemented in nvim' }
+ return { errmsg = 'E5600: Wait commands not yet implemented in Nvim' }
elseif subcmd == 'tab-silent' then
f_tab = true
f_silent = true
@@ -946,8 +946,9 @@ function vim._cs_remote(rcid, server_addr, connect_error, args)
if rcid == 0 then
return { errmsg = connection_failure_errmsg('Send expression failed.') }
end
- print(vim.fn.rpcrequest(rcid, 'nvim_eval', args[2]))
- return { should_exit = true, tabbed = false }
+ local expr = 'string(' .. args[2] .. ')'
+ local res = vim.fn.rpcrequest(rcid, 'nvim_eval', expr)
+ return { result = res, should_exit = true, tabbed = false }
elseif subcmd ~= '' then
return { errmsg = 'Unknown option argument: ' .. args[1] }
end