mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 04:20:09 -04:00
fix(util): pass offset_encoding to apply_text_edits
Offset encoding is a mandatory argument to
`vim.lsp.util.apply_text_edits` since bc722c8a74
Since we are always within a Neovim context, we can just pass `"utf-8"`.
This commit is contained in:
parent
749f72d351
commit
ca837f5218
1 changed files with 1 additions and 1 deletions
|
|
@ -331,7 +331,7 @@ function M.swap_nodes(node_or_range1, node_or_range2, bufnr, cursor_to_second)
|
|||
|
||||
local edit1 = { range = range1, newText = table.concat(text2, "\n") }
|
||||
local edit2 = { range = range2, newText = table.concat(text1, "\n") }
|
||||
vim.lsp.util.apply_text_edits({ edit1, edit2 }, bufnr)
|
||||
vim.lsp.util.apply_text_edits({ edit1, edit2 }, bufnr, "utf-8")
|
||||
|
||||
if cursor_to_second then
|
||||
utils.set_jump()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue