fix(lsp.util): inconsistent handling of offset_encoding

This commit is contained in:
Lewis Russell
2024-10-16 13:17:10 +01:00
parent ff1d7d4299
commit acbc6a7f91
4 changed files with 14 additions and 4 deletions

View File

@@ -338,6 +338,8 @@ function M.rename(new_name, opts)
-- Compute early to account for cursor movements after going async
local cword = vim.fn.expand('<cword>')
--- @param range lsp.Range
--- @param offset_encoding string
local function get_text_at_range(range, offset_encoding)
return api.nvim_buf_get_text(
bufnr,