neovim/node-client

Calling same method/arguments with request() results in different behavior comparing Lua and Node

trkoch opened this issue · 1 comments

See neovim/neovim#13890 (comment). I don't know how to do this from Lua myself.

Steps to reproduce

$ nvim -u NORC --listen /tmp/vim

Buffer

AAA
BBB

neovim/node-client

$ NVIM_LISTEN_ADDRESS=/tmp/vim NVIM_NODE_LOG_FILE=nvim.log node --experimental-repl-await
> const nvim = await require('neovim/scripts/nvim')
> await nvim.request('nvim_buf_set_text', [0, 0, 0, 1, 3, ['XXX', 'YYY']])

Actual behaviour

Buffer

XXX
YYY
BBB

Expected behaviour

XXX
YYY

(Apparently this is the behavior when doing the same thing with Lua inside Neovim).

Turns out node-client does in fact have the behavior as Lua inside Neovim.