test: fix tests broken after 0.10 update (#6714)

This commit is contained in:
Riley Bruins 2024-05-31 20:33:56 -07:00 committed by GitHub
parent b7d50e59b1
commit f9773e4a5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 20 additions and 19 deletions

View file

@ -397,6 +397,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") }
bufnr = bufnr == 0 and vim.api.nvim_get_current_buf() or bufnr
vim.lsp.util.apply_text_edits({ edit1, edit2 }, bufnr, "utf-8")
if cursor_to_second then