aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/lsp_spec.lua
diff options
context:
space:
mode:
authorAl Colmenar <57642956+alcolmenar@users.noreply.github.com>2024-06-07 02:54:43 -0700
committerGitHub <noreply@github.com>2024-06-07 11:54:43 +0200
commit2ce4a4d91e4abee0aab8b98c47eea9fbd4849ba6 (patch)
tree4e3b5a9fee2c05e908fd5d6c19163ceff046f8e0 /test/functional/plugin/lsp_spec.lua
parent6e45cd7f0026ee33b8c397b810dcfe5b4678bbd8 (diff)
downloadrneovim-2ce4a4d91e4abee0aab8b98c47eea9fbd4849ba6.tar.gz
rneovim-2ce4a4d91e4abee0aab8b98c47eea9fbd4849ba6.tar.bz2
rneovim-2ce4a4d91e4abee0aab8b98c47eea9fbd4849ba6.zip
fix(lsp): fix reverse sorting of same position text edits (#29212)
Problem: Text edits with the same position (both line and character) were being reverse sorted prior to being applied which differs from the lsp spec Solution: Change the sort order for just the same position edits
Diffstat (limited to 'test/functional/plugin/lsp_spec.lua')
-rw-r--r--test/functional/plugin/lsp_spec.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 0cf84b50c2..6d28b83be8 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -1789,9 +1789,9 @@ describe('LSP', function()
}
exec_lua('vim.lsp.util.apply_text_edits(...)', edits, 1, 'utf-16')
eq({
- '',
- '123',
- 'fooFbar',
+ '3',
+ 'foo',
+ '12Fbar',
'123irst guy',
'baz line of text',
'The next line of text',
@@ -1813,9 +1813,9 @@ describe('LSP', function()
}
exec_lua('vim.lsp.util.apply_text_edits(...)', edits, 1, 'utf-16')
eq({
- '',
- '123',
- 'fooFbar',
+ '3',
+ 'foo',
+ '12Fbar',
'123irst guy',
'baz line of text',
'The next line of text',