diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-11 15:29:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-11 15:29:51 +0800 |
commit | cce9460524aa17bcd4daa095f4706220b81f8845 (patch) | |
tree | c58ef3571f3745d579a872e4a054fafd846a6157 /runtime/lua/vim/_editor.lua | |
parent | 4229bbe514b7a1bc5b9f888a294cc8a323a7d869 (diff) | |
download | rneovim-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.lua | 7 |
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 |