fix: add shim for vim.lsp.util._str_byteindex() (#3338)
Will be removed in Nvim 0.11: https://github.com/neovim/neovim/pull/30915
This commit is contained in:
@@ -105,7 +105,7 @@ end
|
||||
---@return lsp.Location
|
||||
local function item_to_location(item, offset_encoding)
|
||||
local line = item.lnum - 1
|
||||
local character = vim.lsp.util._str_utfindex_enc(item.text, item.col, offset_encoding) - 1
|
||||
local character = utils.str_byteindex(item.text, item.col, offset_encoding or "utf-16") - 1
|
||||
local uri
|
||||
if utils.is_uri(item.filename) then
|
||||
uri = item.filename
|
||||
|
||||
Reference in New Issue
Block a user