The bug can be reproduced by pressing <CTRL-A> when the cursor is positioned on a multi-byte character. For instance, if you input "你好" and then press <CTRL-A>, the request will inevitably fail.
The reason for this issue is that the vim.api.nvim_win_get_cursor(0) or vim.api.nvim_buf_get_mark(1, "<") functions return the column number of the cursor without including the character under it. To include it, one needs to add one to the column number. This approach works well for single-byte characters but not for multi-byte ones, in which case adding one to the column number in order to include an additional byte results in an invalid encoding byte sequence which causes requests to fail. However, this bug has been resolved now.
The bug can be reproduced by pressing
<CTRL-A>
when the cursor is positioned on a multi-byte character. For instance, if you input "你好" and then press<CTRL-A>
, the request will inevitably fail.The reason for this issue is that the
vim.api.nvim_win_get_cursor(0)
orvim.api.nvim_buf_get_mark(1, "<")
functions return the column number of the cursor without including the character under it. To include it, one needs to add one to the column number. This approach works well for single-byte characters but not for multi-byte ones, in which case adding one to the column number in order to include an additional byte results in an invalid encoding byte sequence which causes requests to fail. However, this bug has been resolved now.