mirror of
https://github.com/neovim/neovim.git
synced 2025-11-17 15:51:32 +00:00
fix(lsp): improve incremental sync robustness (#16358)
closes https://github.com/neovim/neovim/issues/16352 * improve handling of multi-byte deletions
This commit is contained in:
committed by
GitHub
parent
d249e18bbf
commit
f71be1f87b
@@ -297,7 +297,31 @@ describe('incremental synchronization', function()
|
||||
}
|
||||
test_edit({"🔥"}, {"x"}, expected_text_changes, 'utf-16', '\n')
|
||||
end)
|
||||
it('deleting a multiple lines containing multibyte characters', function()
|
||||
it('deleting a multibyte character from a long line', function()
|
||||
local expected_text_changes = {
|
||||
{
|
||||
range = {
|
||||
['start'] = {
|
||||
character = 85,
|
||||
line = 1
|
||||
},
|
||||
['end'] = {
|
||||
character = 86,
|
||||
line = 1
|
||||
}
|
||||
},
|
||||
rangeLength = 1,
|
||||
text = ''
|
||||
}
|
||||
}
|
||||
local original_lines = {
|
||||
"\\begin{document}",
|
||||
"→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→",
|
||||
"\\end{document}",
|
||||
}
|
||||
test_edit(original_lines, {"jx"}, expected_text_changes, 'utf-16', '\n')
|
||||
end)
|
||||
it('deleting multiple lines containing multibyte characters', function()
|
||||
local expected_text_changes = {
|
||||
{
|
||||
range = {
|
||||
|
||||
Reference in New Issue
Block a user